Is The Networkx.multidigraph.edges Method Order-preserving?
MyNetwork is an instance of networkx.MultiDiGraph. I'm wondering if multiple runs of the following code is guaranteed to result exactly the same list containing all edges (along wi
Solution 1:
The list of edges returned from the MultiDiGraph.edges() method is not guaranteed to be in any order or the same when called repeatedly. You'll have to do more processing (e.g. a sort) or maintain a separate list or symbol table of edges if you need a particular ordering.
Post a Comment for "Is The Networkx.multidigraph.edges Method Order-preserving?"