class_docstr: Class for sparse matrix.
class_docstr_tok: ["Class","for","sparse","matrix","."]
docstr: Returns the number of non-zero elements in the sparse matrix.
  
  Returns
  -------
  int
      The number of non-zero elements of the matrix
docstr_tok: ["Returns","the","number","of","non-zero","elements","in","the","sparse","matrix",".","Returns","--","--","--","-","int","The","number","of","non-zero","elements","of","the","matrix"]
code: def nnz(self) -> int:
      """Returns the number of non-zero elements in the sparse matrix.
  
      Returns
      -------
      int
          The number of non-zero elements of the matrix
      """
      return self.c_sparse_matrix.nnz()
  
imports: from typing import Optional, Tuple
  import torch
label_desc: Use image node_id 5 for calling the SparseMatrix obj's underlying member method code with example usage: obj.nnz() and returns: self