cugraph.from_numpy_array#

cugraph.from_numpy_array(A, create_using=<class 'cugraph.structure.graph_classes.Graph'>, vertices=None)[source]#

Initializes the graph from numpy array containing adjacency matrix.

Parameters:
Anumpy.array

A Numpy array that contains adjacency information

create_using: cugraph.Graph (instance or class), optional (default=Graph)

Specify the type of Graph to create. Can pass in an instance to create a Graph instance with specified ‘directed’ attribute.

verticescudf.Series or List, optional (default=None)

A cudf.Series or list containing all vertices of 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.