parameters: (edges)
return_statement: return comp_indices
docstring: Split graph into disconnected components.
  
      Args:
          edges (:class:`numpy.ndarray`): edges of the graph.
  
      Returns:
          An array of indices indicating the component each edge belongs to.
docstring_summary: Split graph into disconnected components.
docstring_tokens: Split graph into disconnected components .
function: def separate_graph(edges):
      """ Split graph into disconnected components.
  
      Args:
          edges (:class:`numpy.ndarray`): edges of the graph.
  
      Returns:
          An array of indices indicating the component each edge belongs to.
      """
      separator = MeshSeparator(edges)
      separator.set_connectivity_type(MeshSeparator.VERTEX)
      num_comps = separator.separate()
  
      comp_indices = np.zeros(len(edges))
      for i in range(num_comps):
          src_idx = separator.get_sources(i).ravel()
          comp_indices[src_idx] = i
      return comp_indices
function_tokens: def separate_graph ( edges ) : separator = MeshSeparator ( edges ) separator . set_connectivity_type ( MeshSeparator . VERTEX ) num_comps = separator . separate ( ) comp_indices = np . zeros ( len ( edges ) ) for i in range ( num_comps ) : src_idx = separator . get_sources ( i ) . ravel ( ) comp_indices [ src_idx ] = i return comp_indices