xspline.xspl¶
- class xspline.xspl.XSpline(knots, degree, ldegree=None, rdegree=None, coef=None)[source]¶
Bases:
BasisXFunctionMain 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[tuple[Any, ...], dtype[_ScalarT]] | 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[tuple[Any, ...], dtype[_ScalarT]]) – 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