[graph-tool-tickets] [graph-tool] Ticket #107: label_components failing for directed graphs
graph-tool
webmaster at skewed.de
Thu Jul 12 14:54:00 UTC 2012
#107: label_components failing for directed graphs
new defect
---------------------------------------------------------------------
Reporter: oleguer.sagarra at gmail.com
Owner: tiago peixoto
Priority: normal
Milestone: (None)
---------------------------------------------------------------------
Something seems to fail on the directed graph version of the identification of label_components.
Check the example: (here q is a Graph instance)
####################################
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)
--
Ticket URL: <URL:http://graph-tool.skewed.de/ticket/107>
graph-tool <URL:http://graph-tool.skewed.de/>
An efficient python module for graph analysis and manipulation.
More information about the graph-tool-tickets
mailing list