Thanks Tiago!
Let me just point out that the part
mask.a = g.degree_property_map("out").a > 4
will (if you are using python 2.x) not give you what you most likely would
like to have, namely a list of boolean values containing the results of the
element wise comparisons of elements g.degree_property_map("out").a[i]>4.
Instead, for some strange reason, you'll simply get the *value* True back,
writing True to all elements in mask.a ... instead, it seems to me, the
only (fastest) way to do it is to use map
mask.a = map(lambda(x): x > 4, g.degree_property_map("out").a)
.... so be careful.
Cheers,
René
attachment.html (3.53 KB)