class_docstr: Class for sparse matrix.
class_docstr_tok: ["Class","for","sparse","matrix","."]
docstr: Returns whether the sparse matrix is a diagonal matrix.
docstr_tok: ["Returns","whether","the","sparse","matrix","is","a","diagonal","matrix","."]
code: def is_diag(self):
      """Returns whether the sparse matrix is a diagonal matrix."""
      return self.c_sparse_matrix.is_diag()
  
imports: from typing import Optional, Tuple
  import torch
label_desc: Use image node_id 27 for calling the SparseMatrix obj's underlying member method code with example usage: obj.is_diag() and returns: self