Skip to content

Commit

Permalink
Bumped up tolerance for test_numpy_fft, test_scipy_fft
Browse files Browse the repository at this point in the history
These two tests were failing for double precision floating
point numbers with MKL 2024.2
  • Loading branch information
oleksandr-pavlyk committed Jul 24, 2024
1 parent 7289e00 commit 58fa68f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mkl_fft/tests/test_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ def test_scipy_fft(norm, dtype):
x = np.ones(511, dtype=dtype)
w = mfi.scipy_fft.fft(x, norm=norm, workers=None, plan=None)
xx = mfi.scipy_fft.ifft(w, norm=norm, workers=None, plan=None)
tol = 64 * np.finfo(np.dtype(dtype)).eps
assert np.allclose(x, xx, atol=tol, rtol=tol)
tol = 128 * np.finfo(np.dtype(dtype)).eps
np.testing.assert_allclose(x, xx, atol=tol, rtol=tol)


@pytest.mark.parametrize('norm', [None, "forward", "backward", "ortho"])
Expand All @@ -53,8 +53,8 @@ def test_numpy_fft(norm, dtype):
x = np.ones(511, dtype=dtype)
w = mfi.numpy_fft.fft(x, norm=norm)
xx = mfi.numpy_fft.ifft(w, norm=norm)
tol = 64 * np.finfo(np.dtype(dtype)).eps
assert np.allclose(x, xx, atol=tol, rtol=tol)
tol = 128 * np.finfo(np.dtype(dtype)).eps
np.testing.assert_allclose(x, xx, atol=tol, rtol=tol)


@pytest.mark.parametrize('norm', [None, "forward", "backward", "ortho"])
Expand Down

0 comments on commit 58fa68f

Please sign in to comment.