jax.numpy.linalg.pinv(a, rcond=None, hermitian=False) = <jax._src.custom_derivatives.custom_jvp object>[source]#

Compute the (Moore-Penrose) pseudo-inverse of a matrix.

LAX-backend implementation of numpy.linalg.pinv().

It differs only in default value of rcond. In numpy.linalg.pinv, the default rcond is 1e-15. Here the default is 10. * max(num_rows, num_cols) * jnp.finfo(dtype).eps.

Original docstring below.

Calculate the generalized inverse of a matrix using its singular-value decomposition (SVD) and including all large singular values.

Changed in version 1.14: Can now operate on stacks of matrices

  • a ((..., M, N) array_like) – Matrix or stack of matrices to be pseudo-inverted.

  • rcond ((...) array_like of float) – Cutoff for small singular values. Singular values less than or equal to rcond * largest_singular_value are set to zero. Broadcasts against the stack of matrices.

  • hermitian (bool, optional) – If True, a is assumed to be Hermitian (symmetric if real-valued), enabling a more efficient method for finding singular values. Defaults to False.


B – The pseudo-inverse of a. If a is a matrix instance, then so is B.

Return type:

(…, N, M) ndarray