Vertex position in property map

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)

Thanks

Haiko

attachment.html (838 Bytes)

The position property map should be:

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

Best,
Tiago