#### Previous topic

scipy.sparse.dok_matrix.getmaxprint

#### Next topic

scipy.sparse.dok_matrix.getrow

# scipy.sparse.dok_matrix.getnnz

`dok_matrix.``getnnz`(axis=None)

  Number of stored values, including explicit zeros.

  Parameters:

  axis : None, 0, or 1

  > Select between the number of values across the whole matrix, in each column, or in each row.

  See also

  `count_nonzero`
    Number of non-zero entries