Network.from_networkx

classmethod Network.from_networkx(graph)[source]

Create a new graph instance from a NetworkX DiGraph instance.

Parameters:
graphnetworkx.DiGraph

NetworkX instance of a directed graph.

Returns:
compas.datastructures.Graph