Am 28.08.19 um 15:00 schrieb Lietz, Haiko:
> Hi all,
> 
> 
> I'm trying to story vertex positions in a property map. Why doesn't it
> work the way I try?
> 
> 
> from graph_tool.all import *
> import numpy as np
> g = Graph()
> pos = g.new_vertex_property('object')
> for i in range(1, 3):
>     v = g.add_vertex()
>     pos[v] = np.array([i, i])
> graph_draw(g, pos=pos)
> 

The position property map should be:

  pos = g.new_vp("vector<double>")

Best,
Tiago

-- 
Tiago de Paula Peixoto <[email protected]>
_______________________________________________
graph-tool mailing list
[email protected]
https://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to