xspline.xspl#
- class xspline.xspl.XSpline(knots, degree, ldegree=None, rdegree=None, coef=None)[source]#
Bases:
BasisXFunction
Main class for xspline functions.
- Parameters:
knots (tuple[float, ...]) – Knots of the spline.
degree (int) – Degree of the spline.
ldegree (int | None) – Left extrapolation polynomial degree.
rdegree (int | None) – Right extrapolation polynomial degree.
coef (ndarray[Any, dtype[_ScalarType_co]] | None) – The coefficients for linear combining the spline basis.
- get_design_mat(x, order=0, check_args=True)[source]#
Create design matrix from spline basis functions.
- Parameters:
x (ndarray[Any, dtype[_ScalarType_co]]) – Data points.
order (int) – Order of differentiation/integration.
check_args (bool) – If
True
, it will automatically check and parse the arguments.
- Returns:
Design matrix from spline basis functions.
- Return type:
describe