cholesky_invert#

hypercoil.functional.matrix.cholesky_invert(X: Tensor) Tensor[source]#

Invert a symmetric positive definite matrix using Cholesky decomposition.

Warning

The input matrix must be symmetric and positive definite. If this is not the case, the function will either raise a LinAlgError or produce undefined results. For positive semidefinite matrices, the Moore-Penrose pseudoinverse can be used instead.

Performance

This does not appear to be any faster than using the inverse directly. In fact, it is almost always slower than jnp.linalg.inv. It’s retained for historical reasons.

Dimension:
Input : \((*, D, D)\)

D denotes the row or column dimension of the matrices to be inverted. * denotes any number of preceding dimensions.

Output : \((*, D, D)\)

As above.

Parameters:
ATensor

Symmetric positive definite matrix.

Returns:
AinvTensor

Inverse of the input matrix.