NetworkX

Previous topic

networkx.DiGraph.copy

Next topic

networkx.DiGraph.subgraph

Quick search

networkx.DiGraph.to_undirected

DiGraph.to_undirected()

Return an undirected representation of the digraph.

A new graph is returned with the same name and nodes and with edge (u,v,data) if either (u,v,data) or (v,u,data) is in the digraph. If both edges exist in digraph and their edge data is different, only one edge is created with an arbitrary choice of which edge data to use. You must check and correct for this manually if desired.