Select some elements of the graph and output to numpy. Args: selector (str): Select a portion of graph as a numpy.ndarray. vertex_range(dict, optional): Slice vertices. Defaults to None. Returns: :class:`graphscope.framework.context.ResultDAGNode
(self, selector, vertex_range=None)
| 422 | self._unload_op = dag_utils.unload_graph(self) |
| 423 | |
| 424 | def to_numpy(self, selector, vertex_range=None): |
| 425 | """Select some elements of the graph and output to numpy. |
| 426 | |
| 427 | Args: |
| 428 | selector (str): Select a portion of graph as a numpy.ndarray. |
| 429 | vertex_range(dict, optional): Slice vertices. Defaults to None. |
| 430 | |
| 431 | Returns: |
| 432 | :class:`graphscope.framework.context.ResultDAGNode`: |
| 433 | A result holds the `numpy.ndarray`, evaluated in eager mode. |
| 434 | """ |
| 435 | # avoid circular import |
| 436 | from graphscope.framework.context import ResultDAGNode |
| 437 | |
| 438 | check_argument(self.graph_type == graph_def_pb2.ARROW_PROPERTY) |
| 439 | vertex_range = utils.transform_vertex_range(vertex_range) |
| 440 | op = dag_utils.graph_to_numpy(self, selector, vertex_range) |
| 441 | return ResultDAGNode(self, op) |
| 442 | |
| 443 | def to_dataframe(self, selector, vertex_range=None): |
| 444 | """Select some elements of the graph and output as a pandas.DataFrame |
nothing calls this directly
no test coverage detected