Am 15.06.20 um 15:52 schrieb James Ruffle:
Thanks for the suggestion Tiago. Unfortunately, it is resulting in the same issue for me.
In extension to the previous example: ug = gt.graph_union(g,u,intersection=u.vertex_index,internal_props=True) gt.remove_parallel_edges(ug) print(ug)
print(g.vp.label[0]) #Myriel
print(ug.vp.label[0]) #’ ‘ #Presumably graph_union wipes the original properties to blank?
#reclaim the lost labels... label=g.copy_property(src=g.vp.label) label[0] #’Myriel’
ug.vp["copied_label"]=label #or similarly, ug.copy_property(src=g.vp.label,tgt=ug.vp.label) #ValueError: Received property map for graph <Graph object, undirected, with 77 vertices and 255 edges, 2 internal vertex properties, 1 internal edge property, 2 internal graph properties, at 0x152bc7410> (base: <Graph object, undirected, with 77 vertices and 255 edges, 2 internal vertex properties, 1 internal edge property, 2 internal graph properties, at 0x152bc7410>), expected: <Graph object, undirected, with 77 vertices and 447 edges, 2 internal vertex properties, 3 internal edge properties, 3 internal graph properties, at 0x153ebb890> (base: <Graph object, undirected, with 77 vertices and 447 edges, 2 internal vertex properties, 3 internal edge properties, 3 internal graph properties, at 0x153ebb890>)
#naturally, collecting the eprob will cause the same error: ug.copy_property(src=u.ep.eprob,tgt=ug.ep.eprob) #ValueError: ….
Could you kindly provide a working example to the advised solution?
Why won't you even attempt to do what I described? You keep insisting on passing properties belonging to other graphs as internal properties, despite the explicit error messages that tell you that you cannot do that. You need to use `Graph.copy_property()`. Please show me an example of where you do something that is _supposed_ to work, so I can say what the problem is. Please send complete and minimal examples. Best, Tiago -- Tiago de Paula Peixoto <tiago@skewed.de>