I'm trying to interpolate some scattered 2D data to other given scattered points in Python. I want to use linear interpolation, but want to apply nearest neighbor to the extrapolation points. Matlab's scatteredInterpolant does exactly what I want, but I am trying to find a function in Python. I've looked through the scipy.interpolate functions, but can't find one where you can specify the extrapolation method.
Does anyone know of an interpolation function in scipy or another library that offers this option? Thanks!