fips.linalg.LinearOperator.solve#

LinearOperator.solve(B)[source]#

Solve self @ X = B for a symmetric positive-definite form.

A dense form solves by Cholesky, falling back to a symmetric LDL^T solve, with a logged warning, when roundoff has tipped it off positive-definite. A diagonal one divides, and raises LinAlgError on a zero. A sparse one uses SuperLU (scipy.sparse.linalg.splu()): SciPy has no sparse Cholesky, and LU keeps the factors sparse, solves every column of B with one factorization, and does not need positive-definiteness. A block diagonal one solves block by block, and a Kronecker one through its factors. A singular form raises LinAlgError in every form.

Parameters:

B (array-like, SciPy sparse matrix or LinearOperator) – The right-hand side: a vector, or a matrix with as many rows as the form.

Returns:

X, dense, with the shape of B.

Return type:

ndarray