Interpolation (scipy.interpolate
)#
There are several general facilities available in SciPy for interpolation and smoothing for data in 1, 2, and higher dimensions. The choice of a specific interpolation routine depends on the data: whether it is onedimensional, is given on a structured grid, or is unstructured. One other factor is the desired smoothness of the interpolator. In short, routines recommended for interpolation can be summarized as follows:
kind 
routine 
continuity 
comment 


1D 
linear 
piecewise continuous 
comes from numpy 

cubic spline 
2nd derivative 

monotone cubic spline 
1st derivative 
nonovershooting 

noncubic spline 
(k1)th derivative 


nearest 
kind=’nearest’, ‘previous’, ‘next’ 

ND curve 
nearest, linear, spline 
(k1)th derivative 
use Ndim y array 

ND regular (rectilinear) grid 
nearest 
method=’nearest’ 

linear 
method=’linear’ 

splines 
2nd derivatives 
method=’cubic’, ‘quintic’ 

monotone splines 
1st derivatives 
method=’pchip’ 

ND scattered 
nearest 
alias: 

linear 

cubic (2D only) 
1st derivatives 

radial basis function 
For data smoothing, functions are provided for 1 and 2D data using cubic splines, based on the FORTRAN library FITPACK.
Additionally, routines are provided for interpolation / smoothing using radial basis functions with several kernels.
Futher details are given in the links below.