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

Simplify internal filtering composition rules for GraphView

parent 479daa91
......@@ -1838,11 +1838,8 @@ class GraphView(Graph):
vmap = self.new_vertex_property("bool")
if issubclass(type(vfilt), numpy.ndarray):
vmap.a = vfilt
vmap.fa = vfilt
omap, inv = g.get_vertex_filter()
if omap is not None:
vmap.a = omap.a if not inv else omap.a ^ 1
for v in g.vertices():
vmap[v] = vfilt(v)
......@@ -1853,11 +1850,8 @@ class GraphView(Graph):
emap = self.new_edge_property("bool")
if issubclass(type(efilt), numpy.ndarray):
vmap.a = efilt
emap.fa = efilt
omap, inv = g.get_edge_filter()
if omap is not None:
emap.a = omap.a if not inv else omap.a ^ 1
for e in g.edges():
emap[e] = efilt(e)
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