Issue with set_edge_filter/clear_filters
There seems to be some issue with
set_edge_filter when using
inverted since graph-tool 2.13.
I could not test it with graph-tool 2.12 as it is not available anymore.
set_edge_filter is used with
inverted=True, then cleared, all following uses of
set_edge_filter are always with
inverted=True, even if
inverted=False is specified.
I did not test this issue with
from graph_tool import Graph g = Graph(directed=False) v0 = g.add_vertex() v1 = g.add_vertex() v2 = g.add_vertex() e01 = g.add_edge(v0, v1) e12 = g.add_edge(v1, v2) e02 = g.add_edge(v0, v2) ep = g.new_edge_property('bool') ep[e01] = True ep[e12] = False ep[e02] = False print 'inverted filter' g.set_edge_filter(ep, inverted=True) print g.edge(0, 1) # filtered out, okay print g.edge(1, 2) print g.edge(0, 2) print g.clear_filters() print 'normal filter' g.set_edge_filter(ep, inverted=False) print g.edge(0, 1) # filtered out, and should not! print g.edge(1, 2) # not filtered out, and should! print g.edge(0, 2) # not filtered out, and should! print g.clear_filters()