Hi,

I would like to create a function which quickly exports a Graph to an edge
list in Python. Bassically the opposite to the `Graph.add_edge_list`
method. My current solution is:

edge_list = [ [int(e.source()), int(e.target())] for e in g.edges()]

As you can imagine this is very slow as the iteration is done in Python and
not C++. Has anyone done this before, or knows how to do this at C++ speed?

Many thanks,

Josh Levy-Kramer
Data Scientist @ Starcount
_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to