star_inv

paminco.linalg.star_inv(matrix, method: paminco.linalg.InverseMethod = InverseMethod.INVERSE, reduced: bool = False, return_reduced: bool = False, sparse: bool = False)[source]

Compute the pseudo inverse of matrix mapping into subspace with v_1=0.

Parameters
matrixndarray or sparse matrix

The matrix.

methodInverseMethod = InverseMethod.INVERSE

Method to use to compute inverse.

InverseMethod.INVERSE - Use scipy.linalg.inv, return ndarray.

InverseMethod.CHOLESKY - Use scipy.linalg.cho_factor, return CholeskyInverse.

reducedbool, default=False

Whether matrix is in reduced form, i.e., w/o first row and column

return_reducedbool, default=False

Whether to return reduced inverse (i.e. w/o first row/column) only.

sparsebool, default=False

Flag to use scipy.sparse.linalg.inv method, if applicable. Has effect only if method == InverseMethod.INVERSE and matrix is sparse. Maybe considerably slower than normal use, even if matrix is sparse.

Returns
ndarray or CholeskyInverse

The pseudo inverse of matrix.