class_docstr: Basic weighted, directed graph class
  
  Member variables:
  
  * V (int): the number of vertices
  * E (int): the number of edges
  
  Methods
  
  * vertices (list, type=int, shape=(V,)): vertices id
  * edges (list, type=int, shape=(E,2)): edges as vertices id tuples
  * weights (list, type=int, shape=(E,)): weights / lengths
    of the graph's edges
class_docstr_tok: ["Basic","weighted",",","directed","graph","class","Member","variables",":","*","V","(","int",")",":","the","number","of","vertices","*","E","(","int",")",":","the","number","of","edges","Methods","*","vertices","(","list",",","type=int",",","shape=","(","V",",",")",")",":","vertices","id","*","edges","(","list",",","type=int",",","shape=","(","E,2",")",")",":","edges","as","vertices","id","tuples","*","weights","(","list",",","type=int",",","shape=","(","E",",",")",")",":","weights","\/","lengths","of","the","graph","'s","edges"]
docstr: Returns a graph with redundant edges removed:
  ecah edge (ab) is present only once in the edge matrix:
  the correspondng weights are added.
  
  Returns
  -------
  the resulting WeightedGraph
docstr_tok: ["Returns","a","graph","with","redundant","edges","removed",":","ecah","edge","(","ab",")","is","present","only","once","in","the","edge","matrix",":","the","correspondng","weights","are","added",".","Returns","--","--","--","-","the","resulting","WeightedGraph"]
code: def cut_redundancies(self):
      """Returns a graph with redundant edges removed:
      ecah edge (ab) is present only once in the edge matrix:
      the correspondng weights are added.
  
      Returns
      -------
      the resulting WeightedGraph
      """
      A = self.to_coo_matrix().tocsr().tocoo()
      return wgraph_from_coo_matrix(A)
  
imports: import numpy
  from scipy.sparse import coo_matrix
label_desc: Use image node_id 5 for calling the WeightedGraph obj's underlying member method code with example usage: obj.cut_redundancies() and returns: wgraph_from_coo_matrix