scipy.sparse.csr_matrix.

scipy.sparse.csr_matrix.ndim#

свойство csr_matrix.ndim#