numpy.linalg.matrix_rank()

numpy.linalg.matrix_rank

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

Return matrix rank of array using SVD method

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

Parameters:

M : {(M,), (M, N)} array_like

array of <=2 dimensions

tol : {None, float}, optional

threshold below which SVD values are considered zero. If tol is N