diff options
Diffstat (limited to 'networkx')
-rw-r--r-- | networkx/algorithms/shortest_paths/weighted.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/networkx/algorithms/shortest_paths/weighted.py b/networkx/algorithms/shortest_paths/weighted.py index f5ff3ee1..a717b671 100644 --- a/networkx/algorithms/shortest_paths/weighted.py +++ b/networkx/algorithms/shortest_paths/weighted.py @@ -2138,6 +2138,7 @@ def negative_edge_cycle(G, weight="weight", heuristic=True): """ if G.size() == 0: return False + # find unused node to use temporarily newnode = -1 while newnode in G: |