diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2022-06-15 08:43:04 +0200 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2022-06-15 08:43:04 +0200 |
commit | c1dfcd4dca136da8dac5a2ec09e15d744f905734 (patch) | |
tree | 79c23b785ef64b47dc4dad93e2906fd8e193abca /lib | |
parent | 7e4b7f3e0132bd9f4ae903fb83b438ee0f4e07b2 (diff) |
param_to_ndarray: handle parameters with numeric and non-numeric values
Diffstat (limited to 'lib')
-rw-r--r-- | lib/utils.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/utils.py b/lib/utils.py index ed21f0f..77f9954 100644 --- a/lib/utils.py +++ b/lib/utils.py @@ -244,8 +244,10 @@ def param_to_ndarray( ret_tuple = list() for i, param in enumerate(param_tuple): if not ignore_index[i]: - if i in category_to_scalar: + if i in category_to_scalar and not is_numeric(param): ret_tuple.append(category_to_scalar[i][param]) + elif categorial_to_scalar: + ret_tuple.append(soft_cast_int(param)) else: ret_tuple.append(param) ret_tuples.append(ret_tuple) |