File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
dpnp/tests/third_party/cupy/math_tests Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1037,17 +1037,17 @@ def test_gradient_invalid_spacings1(self):
1037
1037
def test_gradient_invalid_spacings2 (self ):
1038
1038
# wrong length array in spacing
1039
1039
shape = (32 , 16 )
1040
- spacing = (15 , cupy .arange (shape [1 ] + 1 ))
1041
1040
for xp in [numpy , cupy ]:
1041
+ spacing = (15 , xp .arange (shape [1 ] + 1 ))
1042
1042
x = testing .shaped_random (shape , xp )
1043
1043
with pytest .raises (ValueError ):
1044
1044
xp .gradient (x , * spacing )
1045
1045
1046
1046
def test_gradient_invalid_spacings3 (self ):
1047
1047
# spacing array with ndim != 1
1048
1048
shape = (32 , 16 )
1049
- spacing = (15 , cupy .arange (shape [0 ]).reshape (4 , - 1 ))
1050
1049
for xp in [numpy , cupy ]:
1050
+ spacing = (15 , xp .arange (shape [0 ]).reshape (4 , - 1 ))
1051
1051
x = testing .shaped_random (shape , xp )
1052
1052
with pytest .raises (ValueError ):
1053
1053
xp .gradient (x , * spacing )
You can’t perform that action at this time.
0 commit comments