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 <[email protected]>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ graph-tool mailing list [email protected] http://lists.skewed.de/mailman/listinfo/graph-tool
