class_docstr: Basic topological (non-weighted) directed Graph class
  
  Member variables:
  
  * V (int > 0): the number of vertices
  * E (int >= 0): the number of edges
  
  Properties:
  
  * vertices (list, type=int, shape=(V,))  vertices id
  * edges (list, type=int, shape=(E,2)): edges as vertices id tuples
class_docstr_tok: ["Basic","topological","(","non-weighted",")","directed","Graph","class","Member","variables",":","*","V","(","int",">","0",")",":","the","number","of","vertices","*","E","(","int",">","=","0",")",":","the","number","of","edges","Properties",":","*","vertices","(","list",",","type=int",",","shape=","(","V",",",")",")","vertices","id","*","edges","(","list",",","type=int",",","shape=","(","E,2",")",")",":","edges","as","vertices","id","tuples"]
docstr: Return adjacency matrix as coo sparse
  
  Returns
  -------
  sp: scipy.sparse matrix instance,
      that encodes the adjacency matrix of self
docstr_tok: ["Return","adjacency","matrix","as","coo","sparse","Returns","--","--","--","-","sp",":","scipy.sparse","matrix","instance",",","that","encodes","the","adjacency","matrix","of","self"]
code: def to_coo_matrix(self):
      """Return adjacency matrix as coo sparse
  
      Returns
      -------
      sp: scipy.sparse matrix instance,
          that encodes the adjacency matrix of self
      """
      if self.E > 0:
          i, j = self.edges.T
          sm = coo_matrix(
              (np.ones(self.E), (i, j)), shape=(self.V, self.V)
          )
      else:
          sm = coo_matrix((self.V, self.V))
      return sm
  
imports: import numpy
  from scipy.sparse import coo_matrix
label_desc: Use image node_id 13 for calling the Graph obj's underlying member method code with example usage: obj.to_coo_matrix() and returns: sm