scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturns
_make_periodic_spline(x, y, t, k, axis)

Notes

The original system is formed by n + k - 1 equations where the first k - 1 of them stand for the k - 1 derivatives continuity on the edges while the other equations correspond to an interpolating case (matching all the input points). Due to a special form of knot vector, it can be proved that in the original system the first and last k coefficients of a spline function are the same, respectively. It follows from the fact that all k - 1 derivatives are equal term by term at ends and that the matrix of the original system of linear equations is non-degenerate. So, we can reduce the number of equations to n - 1 (first k - 1 equations could be reduced). Another trick of this implementation is cyclic shift of values of B-splines due to equality of k unknown coefficients. With this we can receive matrix of the system with upper right and lower left blocks, and k diagonals. It allows to use Woodbury formula to optimize the computations.

Parameters

x : array_like, shape (n,)

Abscissas.

y : array_like, shape (n,)

Ordinates.

k : int

B-spline degree.

t : array_like, shape (n + 2 * k,).

Knots taken on a circle, k on the left and k on the right of the vector x .

Returns

b : a BSpline object of the degree ``k`` and with knots ``t``.

Compute the (coefficients of) interpolating B-spline with periodic boundary conditions.

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/_bsplines.py#1005
type: <class 'function'>
Commit: