label_components failing for directed graphs
Something seems to fail on the directed graph version of the identification of label_components.
Check the example: (here q is a Graph instance)
#!python
In [144]: gt.topology.label_components(q) # works fine
Out[144]:
(<PropertyMap object with key type 'Vertex' and value type 'int32_t', for Graph 0x3087190, at 0x12ed6c10>,
array([1, 1, 1, ..., 1, 1, 1], dtype=uint64))
In [145]: gt.topology.label_components(q,directed=True) #fails
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/home/physcomp2/Dropbox/Doctorat/Taxis/paper/proves_sql/<ipython-input-145-127b166e36a1> in <module>()
----> 1 gt.topology.label_components(q,directed=True)
/usr/local/lib/python2.7/dist-packages/graph_tool/topology/__init__.pyc in label_components(g, vprop, directed)
652
653 if directed is not None:
--> 654 g = GraphView(g, directed=directed)
655
656 hist = libgraph_tool_topology.\
/usr/local/lib/python2.7/dist-packages/graph_tool/__init__.pyc in __init__(self, g, vfilt, efilt, directed, reversed)
1828 reversed=False):
1829 self.__base = g if not isinstance(g, GraphView) else g.base
-> 1830 Graph.__init__(self)
1831 # copy graph reference
1832 self._Graph__graph = libcore.GraphInterface(g._Graph__graph, True)
TypeError: unbound method __init__() must be called with Graph instance as first argument (got GraphView instance instead)