pycauset.matrix_rank
Returns the numerical rank of a matrix (the number of singular values above tol).
Parameters
- a (matrix): The input matrix.
- tol (float, optional): Singular-value threshold. Defaults to NumPy's default.
Returns
An integer rank.
Notes
Structural shortcuts avoid an SVD:
is_zeroreturns0.is_identityreturnsmin(rows, cols).is_diagonal/ triangular returns the count of non-zero diagonal entries.
Otherwise a NumPy SVD-based rank is computed.