scipy.sparse.dok_matrix.

scipy.sparse.dok_matrix.nnz#

property dok_matrix.nnz#

儲存值的數量,包含顯式零值。

參見

count_nonzero

非零條目的數量