summaryrefslogtreecommitdiff
path: root/lib/utils.py
diff options
context:
space:
mode:
authorBirte Kristina Friesel <birte.friesel@uos.de>2023-12-07 16:26:25 +0100
committerBirte Kristina Friesel <birte.friesel@uos.de>2023-12-07 16:26:25 +0100
commitc01597f95b593d3cdb75e0163a39e00765791aa0 (patch)
tree628cd842360ec0e6c65de40e63366b6c2a5ae58d /lib/utils.py
parentba0edb7706a29d0a8986e492243d1d6a4540434b (diff)
more debug output
Diffstat (limited to 'lib/utils.py')
-rw-r--r--lib/utils.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/utils.py b/lib/utils.py
index ed5aa14..69e807c 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -209,6 +209,10 @@ def param_to_ndarray(
distinct_values = dict()
category_to_scalar = dict()
+ logger.debug(
+ f"converting param_to_ndarray(with_nan={with_nan}, categorial_to_scalar={categorial_to_scalar}, ignore_indexes={ignore_indexes})"
+ )
+
for param_tuple in param_tuples:
for i, param in enumerate(param_tuple):
if not is_numeric(param):
@@ -336,7 +340,11 @@ def observation_dict_to_by_name(observation):
assert parameter_names == sorted(parameter_names)
for name in by_name:
for entry in by_name[name]["param"]:
- assert len(entry) == len(parameter_names)
+ if len(entry) != len(parameter_names):
+ logger.error(
+ f"by_name[{name}] has an entry with {len(entry)} parameters. I expect {len(parameter_names)} parameters."
+ )
+ assert len(entry) == len(parameter_names)
for attribute in by_name[name]["attributes"]:
by_name[name][attribute] = np.array(by_name[name][attribute])
return by_name, parameter_names