pymead.utils.dict_recursion.compare_dicts_floating_precision#

compare_dicts_floating_precision(dict_1: dict, dict_2: dict, atol: float) bool[source]#

Compares two dictionaries recursively. Early return False if any nested dictionary is found to have a different length, and keys are found not to match, any float values found to not match by the floating-point precision specified by atol, or any non-float values found not to match.

Parameters:
  • dict_1 (dict) – First dictionary to compare

  • dict_2 (dict) – Second dictionary to compare

  • atol (float) – Floating-point precision used to compare float values

Returns:

True if the dictionaries match, False otherwise

Return type:

bool