When calling a method an error gets thrown.
Traceback (most recent call last):
File "./test.py", line 10, in <module>
print prob._objfun_impl(data1)
Boost.Python.ArgumentError: Python argument types in
_base._objfun_impl(cassini_1, tuple)
did not match C++ signature:
_objfun_impl(pagmo::problem::python_base {lvalue}, std::vector<double,
std::allocator<double> >)
How would I go about writing python code that would satisfy the method arguments?
This is in the PyGMO python library, its the PyGMO 1.7 version but the updated version does not contain the necessary problems in it.
Edit (added the code the causes the problem) :
from PyGMO import *
prob = problem.cassini_1()
prob._objfun_impl((1.0,1.0))
I realize the tuple wont satisfy the arguments, however I don't know what would
Borrowing heavily from this excellent answer: Feeding a Python list into a function taking in a vector with Boost Python I created the following MVCE:
Live On Coliru
Build with:
Test with python script:
Prints