bundles / scipy latest / scipy / interpolate / _bsplines / _make_periodic_spline
function
scipy.interpolate._bsplines:_make_periodic_spline
Signature
def _make_periodic_spline ( x , y , t , k , axis , * , xp ) Summary
Compute the (coefficients of) interpolating B-spline with periodic boundary conditions.
Parameters
x: array_like, shape (n,)Abscissas.
y: array_like, shape (n,)Ordinates.
k: intB-spline degree.
t: array_like, shape (n + 2 * k,).Knots taken on a circle,
kon the left andkon the right of the vectorx.
Returns
b: `BSpline` objectA BSpline object of the degree
kand with knotst.
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.
Aliases
-
scipy.interpolate._bsplines._make_periodic_spline