Permalink
Browse files

Update edge filter after purging vertices

  • Loading branch information...
1 parent 314d647 commit 66e5720f3e068ff1ae0c8517c69b090b7b4136ea @count0 committed Oct 16, 2014
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/graph_tool/__init__.py
@@ -2116,6 +2116,11 @@ def purge_vertices(self, in_place=False):
pmap._PropertyMap__map = new_pmap._PropertyMap__map
del self.properties[(pmap.key_type(), pname)]
+ # update edge filter if set
+ efilt = self.get_edge_filter()
+ if efilt[0] is not None:
+ self.set_edge_filter(efilt[0], efilt[1])
+
def purge_edges(self):
"""Remove all edges of the graph which are currently being filtered out,
and return it to the unfiltered state. This operation is not reversible."""

0 comments on commit 66e5720

Please sign in to comment.