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 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.shape)