jax.numpy.linalg.matrix_rank(M, tol=None)[source]#

Return matrix rank of array using SVD method

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

Original docstring below.

Rank of the array is the number of singular values of the array that are greater than tol.

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


tol ((...) array_like, float, optional) –

Threshold below which SVD values are considered zero. If tol is None, and S is an array with singular values for M, and eps is the epsilon value for datatype of S, then tol is set to S.max() * max(M, N) * eps.

Changed in version 1.14: Broadcasted against the stack of matrices


rank – Rank of A.

Return type:

(…) array_like



M (Union[Array, ndarray, bool_, number, bool, int, float, complex]) –