class_docstr: Class for sparse matrix.
class_docstr_tok: ["Class","for","sparse","matrix","."]
docstr: Returns ``True`` if the sparse matrix contains duplicate indices.
  
  Examples
  --------
  >>> indices = torch.tensor([[1, 0, 0, 0, 1], [1, 1, 1, 2, 2]])
  >>> val = torch.tensor([0, 1, 2, 3, 4])
  >>> A = dglsp.spmatrix(indices, val)
  >>> A.has_duplicate()
  True
  >>> A.coalesce().has_duplicate()
  False
docstr_tok: ["Returns","``","True","``","if","the","sparse","matrix","contains","duplicate","indices",".","Examples","--","--","--","--",">",">",">","indices","=","torch.tensor","(","[","[","1",",","0",",","0",",","0",",","1","]",",","[","1",",","1",",","1",",","2",",","2","]","]",")",">",">",">","val","=","torch.tensor","(","[","0",",","1",",","2",",","3",",","4","]",")",">",">",">","A","=","dglsp.spmatrix","(","indices",",","val",")",">",">",">","A.has_duplicate","(",")","True",">",">",">","A.coalesce","(",")",".has_duplicate","(",")","False"]
code: def has_duplicate(self):
      """Returns ``True`` if the sparse matrix contains duplicate indices.
  
      Examples
      --------
      >>> indices = torch.tensor([[1, 0, 0, 0, 1], [1, 1, 1, 2, 2]])
      >>> val = torch.tensor([0, 1, 2, 3, 4])
      >>> A = dglsp.spmatrix(indices, val)
      >>> A.has_duplicate()
      True
      >>> A.coalesce().has_duplicate()
      False
      """
      return self.c_sparse_matrix.has_duplicate()
  
imports: from typing import Optional, Tuple
  import torch
label_desc: Use image node_id 26 for calling the SparseMatrix obj's underlying member method code with example usage: obj.has_duplicate() and returns: self