Relative Content

Tag Archive for pythonnetworkxshortest-path

Efficiently converting edgelist to distance matrix in Python

R user learning Python here. I have an undirected unweighted edgelist and I want a distance matrix, showing the shortest path between all my nodes. There are about 30000 nodes and 40000 edges, and my goal is a 30000×30000 matrix where entry ij shows distance between node i and node j.