scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
bspline(x, n)

Notes

Uses numpy.piecewise and automatic function-generator.

Parameters

x : array_like

a knot vector

n : int

The order of the spline. Must be non-negative, i.e., n >= 0

Returns

res : ndarray

B-spline basis function values

B-spline basis function of order n.

See Also

cubic

A cubic B-spline.

quadratic

A quadratic B-spline.

Examples

We can calculate B-Spline basis function of several orders:

>>> from scipy.signal import bspline, cubic, quadratic
... bspline(0.0, 1) 1
>>> knots = [-1.0, 0.0, -1.0]
... bspline(knots, 2) array([0.125, 0.75, 0.125])
>>> np.array_equal(bspline(knots, 2), quadratic(knots))
True
>>> np.array_equal(bspline(knots, 3), cubic(knots))
True
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.signal._bsplines.bspline scipy.signal._bsplines.cubic scipy.signal._bsplines.quadratic scipy.signal._bsplines.gauss_spline

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