Skip to content

Instantly share code, notes, and snippets.

@hagberg
Created November 30, 2013 16:44
Show Gist options
  • Save hagberg/7721279 to your computer and use it in GitHub Desktop.
Save hagberg/7721279 to your computer and use it in GitHub Desktop.
import networkx as nx
print nx.__version__
g = nx.gnp_random_graph(1000,0.01)
nx.write_gml(g, 'foo.gml')
for i in range(10000):
g = nx.read_gml('foo.gml')
print g.number_of_nodes(), g.number_of_edges()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment