summaryrefslogtreecommitdiff
path: root/lib/utils.py
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2021-03-17 17:56:01 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2021-03-17 17:56:01 +0100
commit53546c9c52b4b45525726babbeb01f7532922783 (patch)
tree7b71e101619134f19a1da57c7dbda99940649294 /lib/utils.py
parent162a0c287f5dab664e9168a60d76c9f8da07e46a (diff)
always handle co-dependent parameters
Diffstat (limited to 'lib/utils.py')
-rw-r--r--lib/utils.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/utils.py b/lib/utils.py
index e39b329..17cdb51 100644
--- a/lib/utils.py
+++ b/lib/utils.py
@@ -175,9 +175,13 @@ def match_parameter_values(input_param: dict, match_param: dict):
return True
-def partition_by_param(data, param_values):
+def partition_by_param(data, param_values, ignore_parameters=list()):
ret = dict()
for i, parameters in enumerate(param_values):
+ # ensure that parameters[param_index] = None does not affect the "param_values" entries passed to this function
+ parameters = list(parameters)
+ for param_index in ignore_parameters:
+ parameters[param_index] = None
param_key = tuple(parameters)
if param_key not in ret:
ret[param_key] = list()