I am sorry if this is relatively simple, but I have been trying to solve this for a while.
So I add the variable "sig_u" using the following line in the add_parameters() function:
-> traj.f_add_parameter('com.sig_u', np.sqrt(10.0), comment='Utilisation curve variance')
And then subsequently try to explore the parameter using the line:
-> explore_dict = {'sig_u': np.arange(8.0, 21.0, 2.0).tolist(),
'a0': [np.array([i, j]) for i in ra0 for j in ra0]}
-> explore_dict = cartesian_product(explore_dict, ('sig_u', 'a0'))
-> # ra0 is a list here to explore all desirable combinations of parameter a0
I always get the error
I have tried changing the data type by changing the .dtype parameter to "np.float64" in np.arange(), however I still get the same error. Tried a bunch of other stuff too, could you please help me out? In my knowledge, np.arang(8.0, 21.0, 2.0) should automatically have the class type float64.
I got it to work by adding the default value of the parameter as np.sqrt(10.0).item(), which convert the "numpy float 64" class to the native python class "float".
I am sorry if this is relatively simple, but I have been trying to solve this for a while.
So I add the variable "sig_u" using the following line in the add_parameters() function: -> traj.f_add_parameter('com.sig_u', np.sqrt(10.0), comment='Utilisation curve variance')
And then subsequently try to explore the parameter using the line: -> explore_dict = {'sig_u': np.arange(8.0, 21.0, 2.0).tolist(), 'a0': [np.array([i, j]) for i in ra0 for j in ra0]}
-> explore_dict = cartesian_product(explore_dict, ('sig_u', 'a0')) -> # ra0 is a list here to explore all desirable combinations of parameter a0
I always get the error
I have tried changing the data type by changing the .dtype parameter to "np.float64" in np.arange(), however I still get the same error. Tried a bunch of other stuff too, could you please help me out? In my knowledge, np.arang(8.0, 21.0, 2.0) should automatically have the class type float64.