back_substitute

sofia_redux.toolkit.splines.spline_utils.back_substitute(amat, beta, n_coefficients, bandwidth)[source]

Use back-substitution to solve a reduced row-echelon form matrix.

The amat matrix MUST be full rank.

Parameters:
amatnumpy.ndarray (float)

The ‘A’ in the system Ax = B of shape (>=n_coefficients, >=bandwidth).

betanumpy.ndarray (float)

The ‘B’ in the system Ax = B of shape (>=n_coefficients,).

n_coefficientsint

The number of coefficients to solve for.

bandwidthint

The bandwidth of matrix A (amat).

Returns:
coefficientsnumpy.ndarray (float)

The coefficients of shape (n_coefficients.).