cugraph.Graph.from_numpy_array#
- Graph.from_numpy_array(np_array, nodes=None)[source]#
Initializes the graph from numpy array containing adjacency matrix.
- Parameters:
- np_arraynumpy.array
A Numpy array that contains adjacency information
- nodes: array-like or None, optional (default=None)
A list of column names, acting as labels for all nodes in the graph. This is optional, but must be used if the graph contains isolated vertices which cannot be represented in the source and destination arrays. If specified, this array must contain every vertex identifier, including vertex identifiers that are already included in the source and destination arrays.