interpn(points, values, xi, method='linear', bounds_error=True, fill_value=nan)¶
Multidimensional interpolation on regular grids.
- pointstuple of ndarray of float, with shapes (m1, ), …, (mn, )
The points defining the regular grid in n dimensions.
- valuesarray_like, shape (m1, …, mn, …)
The data on the regular grid in n dimensions.
- xindarray of shape (…, ndim)
The coordinates to sample the gridded data at
- methodstr, optional
The method of interpolation to perform. Supported are “linear” and “nearest”, and “splinef2d”. “splinef2d” is only supported for 2-dimensional data.
- bounds_errorbool, optional
If True, when interpolated values are requested outside of the domain of the input data, a ValueError is raised. If False, then fill_value is used.
- fill_valuenumber, optional
If provided, the value to use for points outside of the interpolation domain. If None, values outside the domain are extrapolated. Extrapolation is not supported by method “splinef2d”.
- values_xndarray, shape xi.shape[:-1] + values.shape[ndim:]
Interpolated values at input coordinates.
Nearest neighbour interpolation on unstructured data in N dimensions
Piecewise linear interpolant on unstructured data in N dimensions
Linear and nearest-neighbor Interpolation on a regular grid in arbitrary dimensions
Bivariate spline approximation over a rectangular mesh
New in version 0.14.