Skip to content

Commit

Permalink
🚇Update test_result_consistency
Browse files Browse the repository at this point in the history
Update float_resolution for comparison of spectral values.
  • Loading branch information
jsnel committed Dec 12, 2021
1 parent d2bff46 commit 1f6e1cf
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/test_result_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ def data_var_test(
np.abs(eps * expected_values_scaled),
np.ones(expected_var_value.data.shape) * eps,
)
elif "spectra" in expected_var_name:
float_resolution = np.maximum(
np.ones(expected_var_value.data.shape) * eps * np.max(np.abs(expected_var_value.data)),
np.ones(expected_var_value.data.shape) * eps,
)
else:
float_resolution = np.maximum(
np.abs(eps * expected_var_value.data),
Expand Down

0 comments on commit 1f6e1cf

Please sign in to comment.