Skip to content

Commit 8201eab

Browse files
committed
Relax BLI sensor tolerance for float32 FFT platform differences
1 parent 64edf20 commit 8201eab

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_off_grid_sensors.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ def test_sensor(nx, ny, nz):
6767
s3d = BLISensors((x + 0.25, y + 0.3, z + 0.1), (nx, ny, nz))
6868
domain3d = Domain((nx, ny, nz), (1, 1, 1))
6969
# Check ones in ones out.
70+
# rtol=1e-4: BLI uses float32 3D FFT interpolation, which has limited
71+
# precision that varies across platforms (different BLAS/FFT backends).
7072
p3d = FourierSeries(np.ones((nx, ny, nz)), domain3d)
7173
y = s3d(p3d, None, None)
72-
assert (np.all(np.isclose(y, 1)))
74+
assert (np.all(np.isclose(y, 1, rtol=1e-4)))
7375

7476
# Check zeros in zeros out
7577
p3d = FourierSeries(np.zeros((nx, ny, nz)), domain3d)

0 commit comments

Comments
 (0)