From 72755adaed25aff62a76393a9b70e5e5c16b45c3 Mon Sep 17 00:00:00 2001 From: David Hendriks <davidhendriks93@gmail.com> Date: Mon, 10 May 2021 17:31:01 +0100 Subject: [PATCH] Added the np.float64 to the list that can be combined with merge_dict --- binarycpython/utils/functions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/binarycpython/utils/functions.py b/binarycpython/utils/functions.py index 65bfd6de2..01441bdd2 100644 --- a/binarycpython/utils/functions.py +++ b/binarycpython/utils/functions.py @@ -1297,10 +1297,10 @@ def merge_dicts(dict_1: dict, dict_2: dict) -> dict: # See whether the types are actually the same if not type(dict_1[key]) is type(dict_2[key]): # Exceptions: - if (type(dict_1[key]) in [int, float]) and ( - type(dict_2[key]) in [int, float] + if (type(dict_1[key]) in [int, float, np.float64]) and ( + type(dict_2[key]) in [int, float, np.float64] ): - new_dict[key] = dict_1[key] + dict_2[key] + new_dict[key] = dict_1[ke] + dict_2[key] else: print( -- GitLab