{ } Raw JSON

bundles / scipy 1.17.1 / scipy / interpolate / _dierckx / _norm_eq_lsq

built-in

scipy.interpolate._dierckx:_norm_eq_lsq

Summary

Construct the normal equations for the B-spline LSQ problem.

Extended Summary

The observation equations are A @ c = y, and the normal equations are A.T @ A @ c = A.T @ y. This routine fills in the rhs and lhs for the latter.

The B-spline collocation matrix is defined as , so that row j contains all the B-splines which are non-zero at x_j.

The normal eq matrix has at most 2k+1 bands and is constructed in the LAPACK symmetrix banded storage: A[i, j] == ab[i-j, j] with i >= j. See the doctsring for scipy.linalg.cholesky_banded for more info.

Parameters

x : ndarray, shape (n,)

sorted 1D array of x values

t : ndarray, shape (nt + k + 1,)

sorted 1D array of knots

k : int

spline order

y : ndarray, shape (n, s)

a 2D array of y values. The second dimension contains all trailing dimensions of the original array of ordinates.

w : ndarray, shape(n,)

Weights.

ab : ndarray, shape (k+1, n), in Fortran order.

This parameter is modified in-place. On entry: should be zeroed out. On exit: LHS of the normal equations.

rhs : ndarray, shape (n, s), in C order.

This parameter is modified in-place. On entry: should be zeroed out. On exit: RHS of the normal equations.

Aliases

  • scipy.interpolate._dierckx._norm_eq_lsq