Skip to content
Snippets Groups Projects
Commit 8b1f8ae7 authored by David Hendriks's avatar David Hendriks
Browse files

fixed some bugs

parent 8fec5364
No related branches found
No related tags found
No related merge requests found
......@@ -1125,8 +1125,8 @@ 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]):
print(
"Error {} and {} are not of the same type and cannot be merged".format(
dict_1[key], dict_2[key]
"Error key: {} value: {} and key: {} value: {} are not of the same type and cannot be merged".format(
key, dict_1[key], key, dict_2[key]
)
)
raise ValueError
......@@ -1153,7 +1153,7 @@ def merge_dicts(dict_1: dict, dict_2: dict) -> dict:
# Booleans (has to be the type Bool, not just a 0 or 1)
elif isinstance(dict_1[key], bool) and isinstance(dict_2[key], bool):
new_dict[key] = dict_1[key] * dict_2[key]
new_dict[key] = dict_1[key] or dict_2[key]
else:
print(
......
......@@ -1096,7 +1096,6 @@ class Population:
self.grid_options["_count"] = 0
self.grid_options["_probtot"] = 0
self.grid_options["_system_generator"] = None
self.grid_options["error"] = 0
self.grid_options["_failed_count"] = 0
self.grid_options["_failed_prob"] = 0
self.grid_options["_errors_found"] = False
......@@ -1495,7 +1494,7 @@ class Population:
)
code_string += (
indent * (depth + 1)
+ "print('with a total probability of {}'.format(self.grid_options['probtot']))\n"
+ "print('with a total probability of {}'.format(self.grid_options['_probtot']))\n"
)
if dry_run:
......
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