scipy.sparse.dok_matrix.ndim

dok_matrix.ndim = 2

Previous topic

scipy.sparse.dok_matrix.shape

Next topic

scipy.sparse.dok_matrix.nnz