scipy.sparse
dok_matrix.
nnz
Number of stored values, including explicit zeros.
See also
count_nonzero
scipy.sparse.dok_matrix.shape
scipy.sparse.dok_matrix.asformat