Skip to content

Commit

Permalink
SklearnPipelinePermuter: fixed bug when merging nested dicts
Browse files Browse the repository at this point in the history
  • Loading branch information
richrobe committed Nov 29, 2023
1 parent 0fce872 commit b2f4b1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/biopsykit/classification/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down

0 comments on commit b2f4b1d

Please sign in to comment.