Re: [graph-tool] efficent way to assign values to vector property map

2020-06-14 Thread BleakHeart
Hi alexandre, Thank you for the reply. I understood the get_2d_array(), but I am trying to understand how to use the set_2d_array() in my code. For example if do: G = Graph() G.add_vertex(10) vprop = G.new_vertex_property("vector") vprop[G.vertex(1)] = [1,1,0,1] The vprop.get_2d_array(pos=[0,1,2

Re: [graph-tool] efficent way to assign values to vector property map

2020-06-14 Thread Tiago de Paula Peixoto
Am 14.06.20 um 10:32 schrieb BleakHeart: > In my code I will need to assing to specified vertices an array and I can't > understand how to use the pos attribute in the set_2d_array(), because, for > example, if I use set_2d_array(np.array([0.5, 0.2, 0.1, 1]), pos=[0,1,2,3]), > it assigns to each ro