14 Jun
2020
14 Jun
'20
8:48 a.m.
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 row of the property map an element of the given array.
The set_2d_array() method expects a *TWO DIMENSIONAL* array of shape (M, N), where N is the number of vertices, and M in the size of the property vector for each vertex.
Is there a way to select the rows and the columns of the property map?
Not without looping and assiging them one by one. -- Tiago de Paula Peixoto <tiago@skewed.de>