Graph.add_edges(n!=1) doesn't take np.int64 type
Python 2.7.5 (default, Sep 6 2013, 08:38:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import graph_tool as gt
>>> gt.__version__
'2.2.25 (commit feec13d9, Mon Sep 2 00:01:39 2013 +0200)'
>>> import numpy as np
>>> g=Graph()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'Graph' is not defined
>>> g=gt.Graph()
>>> a=np.int64(5)
>>> g.add_vertex(a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib64/python2.7/site-packages/graph_tool/__init__.py", line 1275, in add_vertex
v = libcore.add_vertex(weakref.ref(self), n)
Boost.Python.ArgumentError: Python argument types in
graph_tool.libgraph_tool_core.add_vertex(weakref, numpy.int64)
did not match C++ signature:
add_vertex(boost::python::api::object, unsigned long)
>>> g.add_vertex(n=a)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib64/python2.7/site-packages/graph_tool/__init__.py", line 1275, in add_vertex
v = libcore.add_vertex(weakref.ref(self), n)
Boost.Python.ArgumentError: Python argument types in
graph_tool.libgraph_tool_core.add_vertex(weakref, numpy.int64)
did not match C++ signature:
add_vertex(boost::python::api::object, unsigned long)
>>>
When I do g.add_vertex(int(a)), it works.
In earlier versions np.int64 type was accepted by Graph.add_vertex
Is it supposed to be like that?
Thanks,
Thomas