Hello,
I have been using the attribute functionality of python igraph and
ran into a few issues when attaching vertex and edge attributes:
If you do not specify n ahead of time, it seems like edge attributes
and vertex attributes do not get set.
For example if I do:
g = Graph([(0,1),(1,0)],edge_attrs={'a':[1,2]})
g.es.attribute_names() is empty,
but if I do:
g = Graph(2, [(0,1),(1,0)],edge_attrs={'a':[1,2]})
g.es.attribute_names() has 'a'.
The same seems to hold true for vertex_attrs as well. I have a
feeling that this has to do with shifting the parameters in
Graph.__init__(), but I don't understand exactly how optional
arguments work in python...
Also, if you pass a tuple instead of a list as a key of an
attribute, python crashes with a Bus Error:
g = Graph(2,[(0,1),(1,0)],edge_attrs={'a':(1,2)})
Thanks,
-eytan
_______________________________________________
igraph-help mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/igraph-help