- as_graph(graph_like: Union[int, Sequence[int], networkx.classes.graph.Graph]) networkx.classes.graph.Graph ¶
Create a NetworkX graph from a graph-like.
graph_like – A NetworkX
Graph, a list of nodes or a number. If it is a list of nodes, then a complete graph with those nodes is returned. If it is a number, then the list of nodes is treated as
A NetworkX graph. If
graph_likeis a NetworkX graph then it is returned.