class_docstr: Graph modality
  
  Parameters
  ----------
  data: List[str], required
      A list encoding an adjacency matrix, of a user or an item graph, in the sparse triplet format,         e.g., data=[('user1', 'user4', 1.0)].
class_docstr_tok: ["Graph","modality","Parameters","--","--","--","--","--","data",":","List","[","str","]",",","required","A","list","encoding","an","adjacency","matrix",",","of","a","user","or","an","item","graph",",","in","the","sparse","triplet","format",",","e.g.",",","data=","[","(","'user1","'",",","'user4","'",",","1.0",")","]","."]
docstr: Return batch of vectors from the sparse adjacency matrix corresponding to provided batch_ids.
  
  Parameters
  ----------
  batch_ids: array, required
      An array containing the ids of rows to be returned from the sparse adjacency matrix.
docstr_tok: ["Return","batch","of","vectors","from","the","sparse","adjacency","matrix","corresponding","to","provided","batch_ids",".","Parameters","--","--","--","--","--","batch_ids",":","array",",","required","An","array","containing","the","ids","of","rows","to","be","returned","from","the","sparse","adjacency","matrix","."]
code: def batch(self, batch_ids):
      """Return batch of vectors from the sparse adjacency matrix corresponding to provided batch_ids.
  
      Parameters
      ----------
      batch_ids: array, required
          An array containing the ids of rows to be returned from the sparse adjacency matrix.
      """
  
      return self.matrix[batch_ids]
  
file_path: cornac/cornac/data/graph.py
imports: import scipy.sparse
  import numpy
  from tqdm.auto import trange
  from .None import FeatureModality
label_desc: Use image node_id 7 for calling the GraphModality obj's underlying member method code with example usage: obj.batch(batch_ids) and returns: self