ndsplines.make_lsq_spline¶
- ndsplines.make_lsq_spline(x, y, knots, degrees, w=None, check_finite=True)¶
Construct a least squares regression B-spline.
- Parameters:
x (array_like, shape (num_points, xdim)) – Abscissas.
y (array_like, shape (num_points, ydim)) – Ordinates.
knots (iterable of array_like, shape (n_1 + degrees[0] + 1,), ... (n_xdim, + degrees[-1] + 1)) – Knots and data points must satisfy Schoenberg-Whitney conditions.
degrees (ndarray, shape=(xdim,), dtype=np.int_) –
w (array_like, shape (num_points,), optional) – Weights for spline fitting. Must be positive. If
None
, then weights are all equal. Default isNone
.
- Returns:
b – A least-squares NDSpline.
- Return type:
NDSpline object