SciPy

scipy.signal.quadratic

scipy.signal.quadratic(x)[source]

A quadratic B-spline.

This is a special case of bspline, and equivalent to bspline(x, 2).

Parameters
xarray like

a knot vector

Returns
resndarray

Quadratic B-spline basis function values

See also

bspline

B-spline basis function of order n

cubic

A cubic 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

Previous topic

scipy.signal.cubic

Next topic

scipy.signal.gauss_spline