scipy.interpolate.pchip_interpolate¶
-
scipy.interpolate.
pchip_interpolate
(xi, yi, x, der=0, axis=0)[source]¶ Convenience function for pchip interpolation.
xi and yi are arrays of values used to approximate some function f, with
yi = f(xi)
. The interpolant uses monotonic cubic splines to find the value of new points x and the derivatives there.See
scipy.interpolate.PchipInterpolator
for details.- Parameters
- xiarray_like
A sorted list of x-coordinates, of length N.
- yiarray_like
A 1-D array of real values. yi’s length along the interpolation axis must be equal to the length of xi. If N-D array, use axis parameter to select correct axis.
- xscalar or array_like
Of length M.
- derint or list, optional
Derivatives to extract. The 0-th derivative can be included to return the function value.
- axisint, optional
Axis in the yi array corresponding to the x-coordinate values.
- Returns
- yscalar or array_like
The result, of length R or length M or M by R,
See also