How to transform numpy.matrix or array to scipy sparse matrix
Asked 07 September, 2021
Viewed 2.7K times
  • 58
Votes

For SciPy sparse matrix, one can use todense() or toarray() to transform to NumPy matrix or array. What are the functions to do the inverse?

I searched, but got no idea what keywords should be the right hit.

4 Answer