Ordering of edges returned by EdgePropertyMap.getArray()


I am trying to set a property (my_prop) for all the edges of a graph, where
the property values for all edges are stored in an array A.
My plan is to use my_prop.get_array()[:] = A.
Now, in what order do the values need to be in A to make sure each value
goes to the correct edge? In other words, in what order are the properties
of edges returned by get_array() ?
I initially thought the order would be the same as the one returned by
calling g.get_edges(), but that does not set them correctly. When I tried
with g.edge_index, it seems to work. Can I rely on setting the value of an
edge E in A at position A[g.edge_index[E]] ?

Thanks a lot,


Beautiful! Thanks!

attachment.html (982 Bytes)