bundles / scipy latest / scipy / interpolate / _bsplines / BSpline / from_power_basis
classmethod
scipy.interpolate._bsplines:BSpline.from_power_basis
Summary
Construct a polynomial in the B-spline basis from a piecewise polynomial in the power basis.
Extended Summary
For now, accepts CubicSpline instances only.
Parameters
pp: CubicSplineA piecewise polynomial in the power basis, as created by
CubicSplinebc_type: string, optionalBoundary condition type as in
CubicSpline: one of thenot-a-knot,natural,clamped, orperiodic. Necessary for construction an instance ofBSplineclass. Default isnot-a-knot.
Returns
b: `BSpline` objectA new instance representing the initial polynomial in the B-spline basis.
Notes
Accepts only CubicSpline instances for now.
The algorithm follows from differentiation the Marsden's identity [1]: each of coefficients of spline interpolation function in the B-spline basis is computed as follows:
- a coefficient of CubicSpline, - an m-th defivative of a dual polynomial in .
k always equals 3 for now.
First n - 2 coefficients are computed in , e.g.
Last nod + 2 coefficients are computed in x[-2], nod - number of derivatives at the ends.
For example, consider , and bc_type = natural
The coefficients of CubicSpline in the power basis:
The knot vector:
In this case
Aliases
-
scipy.interpolate.BSpline.from_power_basis