KekLib.SciPyMisc

KekLib.SciPyMisc#

SciPyMisc.py

from https://stackoverflow.com/questions/22488637/getting-spline-equation-from-univariatespline-object

bspleval(x, knots, coeffs, order, debug=False)#

Evaluate a B-spline at a set of points.

Parameters:
  • x (list or ndarray) – The set of points at which to evaluate the spline.

  • knots (list or ndarray) – The set of knots used to define the spline.

  • coeffs (list of ndarray) – The set of spline coefficients.

  • order (int) – The order of the spline.

Returns:

y – The value of the spline at each point in x.

Return type:

ndarray

bspleval_demo()#