interp1d.__init__(x, y, kind='linear', axis=-1, copy=True, bounds_error=True, fill_value=nan)

Initialize a 1D linear interpolation class.

Parameters :

x : array

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

y : array

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

kind : str or int

Specifies the kind of interpolation as a string (‘linear’, ‘nearest’, ‘zero’, ‘slinear’, ‘quadratic, ‘cubic’) or as an integer specifying the order of the spline interpolator to use.

axis : int

Specifies the axis of y along which to interpolate. Interpolation defaults to the last axis of y.

copy : bool

If True, the class makes internal copies of x and y. If False, references to x and y are used. The default is to copy.

bounds_error : bool

If True, an error is thrown any time interpolation is attempted on a value outside of the range of x (where extrapolation is necessary). If False, out of bounds values are assigned fill_value. By default, an error is raised.

fill_value : float

If provided, then this value will be used to fill in for requested points outside of the data range. If not provided, then the default is NaN.

This Page