This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / interpolate / _interpolate / PPoly

class

scipy.interpolate._interpolate:PPoly

source: build-install/usr/lib/python3.14/site-packages/scipy/interpolate/_interpolate.py:1310

Signature

class PPoly(c, x, extrapolate = None, axis = 0)

Members

Summary

Piecewise polynomial in the power basis.

Extended Summary

The polynomial between x[i] and x[i + 1] is written in the local power basis

S = sum(c[m, i] * (xp - x[i])**(k-m) for m in range(k+1))

where k is the degree of the polynomial.

Parameters

c : ndarray, shape (k+1, m, ...)

Polynomial coefficients, degree k and m intervals.

x : ndarray, shape (m+1,)

Polynomial breakpoints. Must be sorted in either increasing or decreasing order.

extrapolate : {bool, 'periodic', None}, optional

If bool, determines whether to extrapolate to out-of-bounds points based on first and last intervals, or to return NaNs. If 'periodic', periodic extrapolation is used. If None (default), it is set to True. See tutorial-interpolate_out_of_bounds.

axis : int, optional

Interpolation axis. Default is zero.

Attributes

x : ndarray

Breakpoints.

c : ndarray

Coefficients of the polynomials. They are reshaped to a 3-D array with the last dimension representing the trailing dimensions of the original coefficient array.

axis : int

Interpolation axis.

Methods

__call__
derivative
antiderivative
integrate
solve
roots
extend
from_spline
from_bernstein_basis
construct_fast

Notes

High-order polynomials in the power basis can be numerically unstable. Precision problems can start to appear for orders larger than 20-30.

See also

BPoly

piecewise polynomials in the Bernstein basis

Aliases

  • scipy.interpolate.PPoly

Referenced by