Accessing property map when a filter is set
Should I be able to access a pmap when a filter is set, and if this shouldn't be possible maybe another exception can be thrown that explains why the map can't be accessed.
This is a example of what happens now:
from graph_tool.all import *
import numpy as np
g = collection.data['polbooks']
filt = g.new_vertex_property('bool', vals=np.random.binomial(1,0.5,size=g.num_vertices()))
g.set_vertex_filter(filt)
pm = g.vp['value']
pm.get_2d_array([0])
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-35-6b06f2e3077b> in <module>()
5 g.set_vertex_filter(filt)
6 pm = g.vp['value']
----> 7 pm.get_2d_array([0])
/home/joelmo/.nix-profile/lib/python2.7/site-packages/graph_tool/__init__.pyc in get_2d_array(self, pos)
663 for v in iters:
664 for i in range(len(p)):
--> 665 a[i][int(v)] = p[i][v]
666 if len(a) == 1:
667 a = a[0]
IndexError: list assignment index out of range