scipy.interpolate.Akima1DInterpolator#
- class scipy.interpolate.Akima1DInterpolator(x, y, axis=0)[source]#
Akima interpolator
Fit piecewise cubic polynomials, given vectors x and y. The interpolation method by Akima uses a continuously differentiable sub-spline built from piecewise cubic polynomials. The resultant curve passes through the given data points and will appear smooth and natural.
- Parameters:
- xndarray, shape (npoints, )
1-D array of monotonically increasing real values.
- yndarray, shape (…, npoints, …)
N-D array of real values. The length of
yalong the interpolation axis must be equal to the length ofx. Use theaxisparameter to select the interpolation axis.- axisint, optional
Axis in the
yarray corresponding to the x-coordinate values. Defaults toaxis=0.
See also
PchipInterpolatorPCHIP 1-D monotonic cubic interpolator.
CubicSplineCubic spline data interpolator.
PPolyPiecewise polynomial in terms of coefficients and breakpoints
Notes
New in version 0.14.
Use only for precise data, as the fitted curve passes through the given points exactly. This routine is useful for plotting a pleasingly smooth curve through a few given points for purposes of plotting.
References
- [1] A new method of interpolation and smooth curve fitting based
on local procedures. Hiroshi Akima, J. ACM, October 1970, 17(4), 589-602.
- Attributes:
- axis
- c
- extrapolate
- x
Methods
__call__(x[, nu, extrapolate])Evaluate the piecewise polynomial or its derivative.
derivative([nu])Construct a new piecewise polynomial representing the derivative.
antiderivative([nu])Construct a new piecewise polynomial representing the antiderivative.
roots([discontinuity, extrapolate])Find real roots of the piecewise polynomial.