scipy.sparse.csr_matrix.ndim

csr_matrix.ndim = 2

Previous topic

scipy.sparse.csr_matrix.shape

Next topic

scipy.sparse.csr_matrix.nnz