scipy 1.8.0 Pypi GitHub Homepage
Other Docs
AttributesMethodsNotesParameters

Attributes

x : tuple of ndarrays

Breakpoints.

c : ndarray

Coefficients of the polynomials.

The value at point xp = (x', y', z', ...) is evaluated by first computing the interval indices i such that:

x[0][i[0]] <= x' < x[0][i[0]+1]
x[1][i[1]] <= y' < x[1][i[1]+1]
...

and then computing:

S = sum(c[k0-m0-1,...,kn-mn-1,i[0],...,i[n]]
        * (xp[0] - x[0][i[0]])**m0
        * ...
        * (xp[n] - x[n][i[n]])**mn
        for m0 in range(k[0]+1)
        ...
        for mn in range(k[n]+1))

where k[j] is the degree of the polynomial in dimension j. This representation is the piecewise multivariate power basis.

Methods

Notes

High-order polynomials in the power basis can be numerically unstable.

Parameters

c : ndarray, shape (k0, ..., kn, m0, ..., mn, ...)

Polynomial coefficients, with polynomial order :None:None:`kj` and :None:None:`mj+1` intervals for each dimension :None:None:`j`.

x : ndim-tuple of ndarrays, shapes (mj+1,)

Polynomial breakpoints for each dimension. These must be sorted in increasing order.

extrapolate : bool, optional

Whether to extrapolate to out-of-bounds points based on first and last intervals, or to return NaNs. Default: True.

Piecewise tensor product polynomial

See Also

PPoly

piecewise polynomials in 1D

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/interpolate/_interpolate.py#1923
type: <class 'type'>
Commit: