From e844c4e325e497ceea5e7ac64d12d77ac5026b95 Mon Sep 17 00:00:00 2001 From: Birte Kristina Friesel Date: Fri, 19 Jan 2024 08:06:57 +0100 Subject: assertions --- lib/parameters.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/parameters.py b/lib/parameters.py index 00ab70a..45a577b 100644 --- a/lib/parameters.py +++ b/lib/parameters.py @@ -1286,8 +1286,11 @@ class ModelAttribute: ) ) ) + assert len(child_indexes[-1]) > 0 - if len(list(filter(len, child_indexes))) <= 1: + assert len(child_indexes) != 0 + + if len(child_indexes) == 1: # this param only has a single value. there's no point in splitting. loss.append(np.inf) continue -- cgit v1.2.3