Skip to content

Commit 99fe894

Browse files
committed
update an FFT test
1 parent 81144e8 commit 99fe894

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/test_fft.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,10 +564,13 @@ def test_fftn_out(self, axes, s):
564564
assert_dtype_allclose(iresult, iexpected, check_only_type_kind=True)
565565

566566
def test_negative_s(self):
567-
# stock NumPy 2.0, if s is -1, the whole input is used (no padding/trimming).
568-
a_np = numpy.empty((3, 4, 5), dtype=numpy.complex64)
567+
x1 = numpy.random.uniform(-10, 10, 60)
568+
x2 = numpy.random.uniform(-10, 10, 60)
569+
a_np = numpy.array(x1 + 1j * x2, dtype=numpy.complex64).reshape(3, 4, 5)
569570
a = dpnp.array(a_np)
570571

572+
# For dpnp and stock NumPy 2.0, if s is -1, the whole input is used
573+
# (no padding or trimming).
571574
result = dpnp.fft.fftn(a, s=(-1, -1), axes=(0, 2))
572575
expected = numpy.fft.fftn(a_np, s=(3, 5), axes=(0, 2))
573576
assert_dtype_allclose(result, expected, check_only_type_kind=True)

0 commit comments

Comments
 (0)