Commit d0871cee authored by Tiago Peixoto's avatar Tiago Peixoto
Browse files

Fix bug in label_largest_component() with filtered graphs

parent b88b299a
......@@ -808,10 +808,7 @@ def label_largest_component(g, directed=None):
label = g.new_vertex_property("bool")
c, h = label_components(g, directed=directed)
vfilt, inv = g.get_vertex_filter()
if vfilt is None:
label.a = c.a == h.argmax()
else:
label.a = (c.a == h.argmax()) & (vfilt.a ^ inv)
label.fa = c.fa == h.argmax()
return label
......
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