Replies: 1 comment
-
I think this might be a bug, and 1d arrays should be supported. In your case, the workaround consists of calling stats = bt.optimize(stop_loss_offset=np.arange(0.01, 0.10, 0.01).tolist()) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I need to run the optimizer with decimal point values. If I use the numpy.arrange function, this library throws an error.
stats = bt.optimize( stop_loss_offset = np.arange(0.01, 0.10, 0.01), maximize='Return [%]')
Error thrown: TypeError: unhashable type: 'numpy.ndarray'
File "pandas/_libs/hashtable_class_helper.pxi", line 5943, in pandas._libs.hashtable.PyObjectHashTable.factorize
File "pandas/_libs/hashtable_class_helper.pxi", line 5857, in pandas._libs.hashtable.PyObjectHashTable._unique
Beta Was this translation helpful? Give feedback.
All reactions