scipy.sparse.dia_matrix. scipy.sparse.dia_matrix.nnz# property dia_matrix.nnz# 存储值的数量,包括显式零。 参见 count_nonzero非零条目的数量