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: Removes all the edges for which valid==0
  
  Parameters
  ----------
  valid : (self.E,) array
docstr_tok: ["Removes","all","the","edges","for","which","valid==0","Parameters","--","--","--","--","--","valid",":","(","self.E",",",")","array"]
code: def remove_edges(self, valid):
      """Removes all the edges for which valid==0
  
      Parameters
      ----------
      valid : (self.E,) array
      """
      if np.size(valid) != self.E:
          raise ValueError(
              "the input vector does not have the correct size"
          )
      valid = np.reshape(valid, np.size(valid))
      self.E = int(valid.sum())
      self.edges = self.edges[valid != 0]
      self.weights = self.weights[valid != 0]
  
imports: import numpy
  from scipy.sparse import coo_matrix
label_desc: Use image node_id 21 for calling the WeightedGraph obj's underlying member method code with example usage: obj.remove_edges(valid) without return types