Commit 25270bf5 authored by Tiago Peixoto's avatar Tiago Peixoto

Fix Graph.copy_property() for undirected graphs

This fixes a problem which occurs when copying external property maps
when using undirected graphs.
parent 162b8c06
......@@ -2673,13 +2673,14 @@ class Graph(object):
if full:
if g is sf:
g = GraphView(g, skip_properties=True, skip_efilt=True,
skip_vfilt=True, directed=True)
skip_vfilt=True)
sf = g
else:
g = GraphView(g, skip_properties=True, skip_efilt=True,
skip_vfilt=True, directed=True)
skip_vfilt=True)
sf = GraphView(sf, skip_properties=True, skip_efilt=True,
skip_vfilt=True, directed=True)
skip_vfilt=True)
if src.key_type() == "v":
if g.num_vertices() > sf.num_vertices():
raise ValueError("graphs with incompatible sizes (%d, %d)" %
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment