boost.python 参数类型不匹配(numpy.int64 -> int)
我遇到了这个问题:
Boost.Python.ArgumentError: Python argument types in
Dirichlet.Observe(int, numpy.int64, float)
did not match C++ signature:
Observe(unsigned int, unsigned int, double)
看起来差不多吧?
在做了一些替换之后,我发现中间的那个参数有问题。请问我该怎么把numpy.int64转换成int呢?
1 个回答
3
你可以试试...
int(numpyint)