jax.numpy.linalg.pinvΒΆ

jax.numpy.linalg.pinv = <jax._src.custom_derivatives.custom_jvp object>[source]ΒΆ

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

LAX-backend implementation of 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

Parameters
  • 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.

Returns

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

Return type

(.., N, M) ndarray

References

1

G. Strang, Linear Algebra and Its Applications, 2nd Ed., Orlando, FL, Academic Press, Inc., 1980, pp. 139-142.