Skip to content

Commit 228447f

Browse files
committed
Update tests for dpnp.gradient
1 parent d449db8 commit 228447f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpnp/tests/third_party/cupy/math_tests/test_sumprod.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,17 +1037,17 @@ def test_gradient_invalid_spacings1(self):
10371037
def test_gradient_invalid_spacings2(self):
10381038
# wrong length array in spacing
10391039
shape = (32, 16)
1040-
spacing = (15, cupy.arange(shape[1] + 1))
10411040
for xp in [numpy, cupy]:
1041+
spacing = (15, xp.arange(shape[1] + 1))
10421042
x = testing.shaped_random(shape, xp)
10431043
with pytest.raises(ValueError):
10441044
xp.gradient(x, *spacing)
10451045

10461046
def test_gradient_invalid_spacings3(self):
10471047
# spacing array with ndim != 1
10481048
shape = (32, 16)
1049-
spacing = (15, cupy.arange(shape[0]).reshape(4, -1))
10501049
for xp in [numpy, cupy]:
1050+
spacing = (15, xp.arange(shape[0]).reshape(4, -1))
10511051
x = testing.shaped_random(shape, xp)
10521052
with pytest.raises(ValueError):
10531053
xp.gradient(x, *spacing)

0 commit comments

Comments
 (0)