Fix np.bool_ not outputting correctly

This commit is contained in:
Matthias 2021-07-02 20:52:25 +02:00
parent e034f11dcc
commit b25ad68c44

View File

@ -25,6 +25,9 @@ NON_OPT_PARAM_APPENDIX = " # value loaded from strategy"
def hyperopt_serializer(x): def hyperopt_serializer(x):
if isinstance(x, np.integer): if isinstance(x, np.integer):
return int(x) return int(x)
if isinstance(x, np.bool_):
return bool(x)
return str(x) return str(x)