SciPy

scipy.interpolate.PchipInterpolator.__call__

PchipInterpolator.__call__(x, der=0, extrapolate=None)[source]

Evaluate the PCHIP interpolant or its derivative.

Parameters:

x : array-like

Points to evaluate the interpolant at.

der : int, optional

Order of derivative to evaluate. Must be non-negative.

extrapolate : bool, optional

Whether to extrapolate to ouf-of-bounds points based on first and last intervals, or to return NaNs.

Returns:

y : array-like

Interpolated values. Shape is determined by replacing the interpolation axis in the original array with the shape of x.