igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] write to file problem


From: Simone Gabbriellini
Subject: [igraph] write to file problem
Date: Thu, 20 Jan 2011 15:49:43 +0100

Hello list,

I am trying to write to file a graph that I have just generated with:

# build graph
g = igraph.Graph(top+bottom, directed = False)
# add attributes
g.vs["type"] = [int(i >= top) for i in xrange(top+bottom)]
g.vs["name"] = [v.index for v in g.vs]
# add some random edges between top and bottom nodes
[g.add_edges((v.index, random.choice(g.vs(type=1)).index)) for v in
random.sample(g.vs(type=0), bottom)]
# write file
g.write_graphml('test.graphml')

but nothing happens... is there something I am missing in the writing method?

Best regards,
Simone



reply via email to

[Prev in Thread] Current Thread [Next in Thread]