scipy.interpolate.pchip

scipy.interpolate.pchip(x, y)[source]

PCHIP 1-d monotonic cubic interpolation

x and y are arrays of values used to approximate some function f, with y = f(x). This class factory function returns a callable class whose __call__ method uses monotonic cubic, interpolation to find the value of new points.

Parameters :

x : array

A 1D array of monotonically increasing real values. x cannot include duplicate values (otherwise f is overspecified)

y : array

A 1-D array of real values. y’s length along the interpolation axis must be equal to the length of x.

Assumes x is sorted in monotonic order (e.g. ``x[1] > x[0]``). :

Returns :

pchip : PiecewisePolynomial instance

The result of the interpolation.

Previous topic

scipy.interpolate.PiecewisePolynomial.extend

Next topic

scipy.interpolate.barycentric_interpolate