Closed jdmoore7 closed 3 years ago
Hi @jdmoore7 , you can probably use kwargs in the function definition to achieve the desired result:
def f(**kwargs):
v1 = np.array([kwargs[f'x_{i}'] for i in range(2)])
v2 = np.array([kwargs[f'y_{i}'] for i in range(2)])
return np.dot(v1, v2)
Let me know if this helps.
Perfect fix, thanks!
Not seeing a way in documentation to easily pass arrays into PyGPGO. The hackiest way I've thought of handling this problem is as follows:
However, the error is returned: