boost.python argument type mismatch (numpy.int64 -> int)

孤者浪人 提交于 2019-12-11 13:22:09

问题


I'm running into this problem:

Boost.Python.ArgumentError: Python argument types in
    Dirichlet.Observe(int, numpy.int64, float)
did not match C++ signature:
    Observe(unsigned int, unsigned int, double)

Seems close enough?

After doing some replacement, it seems that the middle argument is the problem. How do I convert numpy.int64 to int?


回答1:


You could you try...

int(numpyint)


来源:https://stackoverflow.com/questions/4383515/boost-python-argument-type-mismatch-numpy-int64-int

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!