4 Nov
2015
4 Nov
'15
8:04 a.m.
On 04.11.2015 00:43, Yannis Haralambous wrote:
mylabel = g.new_vertex_property("string") for v in g.vertices(): g.vp['mylabel'][v] = str(g.vp['labelv'][v])+" ("+str(g.vertex_index[v])+")"
Property maps do not automatically show up in the internal dictionary. Here it should be simply: mylabel = g.new_vertex_property("string") for v in g.vertices(): mylabel[v] = str(g.vp['labelv'][v])+" ("+str(g.vertex_index[v])+")" or alternatively, you should store the property in the dictionary first: g.vp["mylabel"] = mylabel Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>