perturbopy.test_utils.compare_data.yaml.equal_scalar
- perturbopy.test_utils.compare_data.yaml.equal_scalar(scalar1, scalar2, key, ig_n_tol)
Determines if two scalars contain the same value
- Parameters:
scalar1 (numpy.dtype) – first scalar
scalar2 (numpy.dtype) – second scalar
key (str) – key associated with this scalar
ig_n_tol (dict) – dictionary of ignore keywords and tolerances needed to make comparison on values
- Returns:
equal_value (bool) – boolean specifying if both scalars contain the same values
diff_str (str) – string which contains the information about the calculation error
output_res_val (str) – here for consistency, just a copy of the diff_str