Skip to content

Commit 1fe453f

Browse files
committed
TST: sinc: add 3D test
1 parent 68e0a6f commit 1fe453f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_funcs.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,3 +237,9 @@ def test_simple(self):
237237
def test_dtype(self, x):
238238
with pytest.raises(ValueError, match="real floating data type"):
239239
sinc(xp.asarray(x), xp=xp)
240+
241+
def test_3d(self):
242+
x = xp.reshape(xp.arange(18, dtype=xp.float64), (3, 3, 2))
243+
expected = xp.zeros((3, 3, 2))
244+
expected[0, 0, 0] = 1.0
245+
assert_allclose(sinc(x, xp=xp), expected, atol=1e-15)

0 commit comments

Comments
 (0)