GraphView + purge_vertices + edge_property crash
#!python
import graph_tool.all as gt
Bug = True
G = gt.complete_graph(10)
G.vp['label'] = vlbl = G.new_vertex_property("string")
for v in G.vertices(): vlbl[v] = "temp"
if Bug:
G.ep['label'] = elbl = G.new_edge_property("string")
for e in G.edges(): elbl[e] = "test"
vfilt = G.new_vertex_property("bool")
efilt = G.new_edge_property("bool")
for v in G.vertices(): vfilt[v] = True
for e in G.edges(): efilt[e] = True
G1 = gt.GraphView(G,vfilt=vfilt,efilt=efilt).copy()
G1.purge_vertices()
print G1.num_vertices()
Output:
[...]
File "/[...]/python2.7/site-packages/graph_tool/__init__.py", line 2048, in num_vertices
return self.__graph.GetNumberOfVertices()
RuntimeError: Vertex filter is active but edge filter is not. This is a bug.