"ValueError: Cannot get array for an orphaned property map" when returning values of PropertyMap"
If I call the following function:
def stupid():
newg = graph_tool.Graph()
newg.add_edge(1,2)
degs = newg.degree_property_map("out").a
return degs
I get ValueError: Cannot get array for an orphaned property map" when returning values of PropertyMap
.
Admittedly, this is solved with degs = newg.degree_property_map("out").a.copy()
... still, it would be optimal to not destroy a property map until its a
attribute is still referenced.
(You'll decide whether this is worth the effort...)