Merge pull request #2137 from hroff-1902/hyperopt-adaptive-roi-space

Hyperopt: adaptive roi_space
This commit is contained in:
Matthias
2019-09-06 06:26:52 +02:00
committed by GitHub
6 changed files with 128 additions and 34 deletions

View File

@@ -114,3 +114,10 @@ def deep_merge_dicts(source, destination):
destination[key] = value
return destination
def round_dict(d, n):
"""
Rounds float values in the dict to n digits after the decimal point.
"""
return {k: (round(v, n) if isinstance(v, float) else v) for k, v in d.items()}