We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e4f960f commit 9687712Copy full SHA for 9687712
backtesting/backtesting.py
@@ -1563,7 +1563,7 @@ def _optimize_openbox() -> Union[pd.Series,
1563
values = values.astype(int)
1564
1565
if len(values) == 1:
1566
- variables.append(sp.Constant(value=values[0], name=key))
+ variables.append(sp.Constant(value=values[0].astype("f"), name=key))
1567
elif values.dtype.kind in 'iumM':
1568
variables.append(sp.Int(lower=values.min(), upper=values.max(), name=key))
1569
elif values.dtype.kind == 'f':
0 commit comments