Weighted shortest path limits: handling missing weights and negative edges in NetworkX
When using NetworkX’s weighted shortest‑path functions, the caller must decide which algorithm to invoke and how to treat edges that lack the requested weight attribute. Dijkstra‑based routines (e.g., dijkstra_path ) assume all weights are non‑negative and will silently produce incorrect results if a negative weight is present. Bellman‑Ford routines (e.g., b