scipy.sparse.dok_array.

scipy.sparse.dok_array.ndim#

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