scipy.sparse.dia_matrix.ndim

dia_matrix.ndim = 2

Previous topic

scipy.sparse.dia_matrix.shape

Next topic

scipy.sparse.dia_matrix.nnz