Skip to content

Commit

Permalink
Updated tolerance in test to account for machine epsilon in float com…
Browse files Browse the repository at this point in the history
…parison
  • Loading branch information
sm00thix committed Jul 7, 2024
1 parent f1a60ea commit 9ccc4e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_ikpls.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,10 @@ def check_cpu_gpu_equality(
if n_good_components == -1:
n_good_components = np_pls_alg_1.A

atol = 0
try:
atol = np.finfo(np_pls_alg_1.dtype).eps
except AttributeError:
atol = 0
rtol = 1e-4
# Regression matrices
assert_allclose(
Expand Down

0 comments on commit 9ccc4e3

Please sign in to comment.