Skip to content

Commit 58fa68f

Browse files
Bumped up tolerance for test_numpy_fft, test_scipy_fft
These two tests were failing for double precision floating point numbers with MKL 2024.2
1 parent 7289e00 commit 58fa68f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

mkl_fft/tests/test_interfaces.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ def test_scipy_fft(norm, dtype):
4343
x = np.ones(511, dtype=dtype)
4444
w = mfi.scipy_fft.fft(x, norm=norm, workers=None, plan=None)
4545
xx = mfi.scipy_fft.ifft(w, norm=norm, workers=None, plan=None)
46-
tol = 64 * np.finfo(np.dtype(dtype)).eps
47-
assert np.allclose(x, xx, atol=tol, rtol=tol)
46+
tol = 128 * np.finfo(np.dtype(dtype)).eps
47+
np.testing.assert_allclose(x, xx, atol=tol, rtol=tol)
4848

4949

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

5959

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

0 commit comments

Comments
 (0)