From b2f4b1d85b73fac50730d3a6e6cd14df948c02b6 Mon Sep 17 00:00:00 2001 From: Robert Richer Date: Wed, 29 Nov 2023 17:55:18 +0100 Subject: [PATCH] SklearnPipelinePermuter: fixed bug when merging nested dicts --- src/biopsykit/classification/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/biopsykit/classification/utils.py b/src/biopsykit/classification/utils.py index 7279f58..cfd087f 100644 --- a/src/biopsykit/classification/utils.py +++ b/src/biopsykit/classification/utils.py @@ -243,7 +243,7 @@ def _merge_nested_dicts(dict1: Dict, dict2: Dict) -> Dict: for d in list_of_dicts: for k, v in d.items(): # Use set to avoid duplicates, then convert it back to a list - merged_dict[k] = list(set(merged_dict.get(k, []) + v)) + merged_dict[k] = list(set(merged_dict.get(k, []) + list(v))) # Convert the merged result back to dictionaries result = [dict(merged_dict)]