Skip to content

Instantly share code, notes, and snippets.

@ev-br
Last active November 8, 2022 15:48
Show Gist options
  • Save ev-br/fcd25570c3f332faefd521e6d3c87510 to your computer and use it in GitHub Desktop.
Save ev-br/fcd25570c3f332faefd521e6d3c87510 to your computer and use it in GitHub Desktop.
Recommended routines for interpolation in `scipy.interpolate`
kind routne continuity comment alias
linear numpy.interp broken line comes from numpy
cubic spline CubicSpline 2nd derivative
1D monotone cubic spline PchipInterpolator 1st derivative non-overshooting
non-cubic spline make_interp_spline (k-1)th derivative
nearest interp1d none kind='nearest',
'previous', 'next'
-----------------
N-D curve nearest, linear, spline make_interp_spline (k-1)th derivative use N-dim y array
-----------------
nearest
N-D regular grid linear RegularGridInterpolator rectilinear grids interpn
splines 2nd derivatives
monotone splines 1st derivatives method='pchip'
-----------------
nearest NearestNDInterpolator
N-D scattered linear LinearNDInterpolator griddata
cubic (2D only) CloughTocher2DInterpolator 1st derivatives
@tupui
Copy link

tupui commented Nov 8, 2022

Thanks 😃

And just opened scipy/scipy#17371

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment