SciPy

scipy.interpolate.NearestNDInterpolator

class scipy.interpolate.NearestNDInterpolator(x, y)[source]

Nearest-neighbour interpolation in N dimensions.

New in version 0.9.

Parameters:

x : (Npoints, Ndims) ndarray of floats

Data point coordinates.

y : (Npoints,) ndarray of float or complex

Data values.

rescale : boolean, optional

Rescale points to unit cube before performing interpolation. This is useful if some of the input dimensions have incommensurable units and differ by many orders of magnitude.

New in version 0.14.0.

tree_options : dict, optional

Options passed to the underlying cKDTree.

New in version 0.17.0.

Notes

Uses scipy.spatial.cKDTree

Methods

__call__(*args) Evaluate interpolator at given points.