There does not seem to be a method in scipy.sparse which gives the minimum of a sparse matrix. In particular, I seek the minimum of the columns.
No method appears in the docs and numpy minimum does not apply. If X is a sparse matrix, X.min() also throws the error: *** AttributeError: 'module' object has no attribute 'min'.
Surely this must be something people use. How is this done?
With CSR/CSC matrices, use
To do this per row or column, you can
mapthis overX.getrow(i) for i in X.shape[0]orX.shape[1].But you’re right, this should be a method.