Skip to content
Snippets Groups Projects
Commit d24370bc authored by dh00601's avatar dh00601
Browse files

bugfix for the merge dict function

parent d353618e
No related branches found
No related tags found
No related merge requests found
Pipeline #33449 passed
......@@ -1736,12 +1736,12 @@ def merge_dicts(dict_1: dict, dict_2: dict) -> dict:
# floats will be added, lists will be appended (though that might change) and dicts will be
# dealt with by calling this function again.
else:
# ints
# Booleans (has to be the type Bool, not just a 0 or 1)
if isinstance(dict_1[key], bool) and isinstance(dict_2[key], bool):
new_dict[key] = dict_1[key] or dict_2[key]
elif isinstance(dict_1[key], int) and isinstance(dict_2[key], int):
# ints
elif isinstance(dict_1[key], (int, np.int64)) and isinstance(dict_2[key], (int, np.int64)):
new_dict[key] = dict_1[key] + dict_2[key]
# floats
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment