interp#
- named_arrays.interp(x, xp, fp, axis=None, left=None, right=None, period=None)#
Thin wrapper around
numpy.interp().Performs 1D interpolation on monotonically-increasing sample points along the specified axes.
This function adds an
axisargument to allow for interpolating \(n\)-dimensional arrays.- Parameters:
x (float | Quantity | AbstractArray) – The new \(x\) coordinates where the interpolant will be evaluated.
xp (AbstractArray) – The \(x\) coordinates of the data points.
fp (AbstractArray) – The \(y\) coordinates of the data points.
axis (None | str) – The logical axis along which to interpolate.
left (None | float | Quantity | AbstractArray) – Value to return for points less than
xp[{axis: 0}]. Default isfp[{axis: 0}]right (None | float | Quantity | AbstractArray) – Value to return for points larger than
xp[{axis: ~0}]period (None | float | Quantity | AbstractArray) – A period for the \(x\) coordinates. This parameter allows for proper interpolation of angular coordinates
- Return type: