on-internet
← Community

Rank of Sparse matrix Python

Stack Overflow ·

I have a sparse csr matrix, sparse.csr_matrix(A), for which I would like to compute the matrix rank There are two options that I am aware of: I could convert it to numpy matrix or array (.todense() or .toarray()) and then use np.linalg.matrix_rank(A), which defeats my purpose of using the sparse matrix format, since I have extremely large matrices. The other option is to compute a SVD decomposition (sparse matrix svd in python) for a matrix, then deduce matrix rank from this. Are there any other options for this? Is there currently a standard, most efficient way for me to compute the rank of a

Comments

Sign in or sign up to comment and upvote.

No comments yet.