bundles / scipy 1.17.1 / scipy / signal / _spline_filters / gauss_spline
function
scipy.signal._spline_filters:gauss_spline
Signature
def gauss_spline ( x , n ) Summary
Gaussian approximation to B-spline basis function of order n.
Parameters
x: array_likea knot vector
n: intThe order of the spline. Must be non-negative, i.e., n >= 0
Returns
res: ndarrayB-spline basis function values approximated by a zero-mean Gaussian function.
Notes
The B-spline basis function can be approximated well by a zero-mean Gaussian function with standard-deviation equal to for large n :
Array API Standard Support
gauss_spline has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable SCIPY_ARRAY_API=1 and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.
==================== ==================== ==================== Library CPU GPU ==================== ==================== ==================== NumPy ✅ n/a CuPy n/a ✅ PyTorch ✅ ✅ JAX ✅ ✅ Dask ✅ n/a ==================== ==================== ====================
See
dev-arrayapifor more information.
Examples
We can calculate B-Spline basis functions approximated by a Gaussian distribution:import numpy as np from scipy.signal import gauss_spline knots = np.array([-1.0, 0.0, -1.0])✓
gauss_spline(knots, 3)
✗Aliases
-
scipy.signal.gauss_spline