@@ -1162,51 +1162,75 @@ def test_ediff1d_ed2(self, xp, dtype):
1162
1162
class TestTrapezoid :
1163
1163
1164
1164
@testing .for_all_dtypes ()
1165
- @testing .numpy_cupy_allclose (rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 })
1165
+ @testing .numpy_cupy_allclose (
1166
+ rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 },
1167
+ type_check = has_support_aspect64 (),
1168
+ )
1166
1169
def test_trapz_1dim (self , xp , dtype ):
1167
1170
a = testing .shaped_arange ((5 ,), xp , dtype )
1168
1171
return xp .trapezoid (a )
1169
1172
1170
1173
@testing .for_all_dtypes ()
1171
- @testing .numpy_cupy_allclose (rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 })
1174
+ @testing .numpy_cupy_allclose (
1175
+ rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 },
1176
+ type_check = has_support_aspect64 (),
1177
+ )
1172
1178
def test_trapz_1dim_with_x (self , xp , dtype ):
1173
1179
a = testing .shaped_arange ((5 ,), xp , dtype )
1174
1180
x = testing .shaped_arange ((5 ,), xp , dtype )
1175
1181
return xp .trapezoid (a , x = x )
1176
1182
1177
1183
@testing .for_all_dtypes ()
1178
- @testing .numpy_cupy_allclose (rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 })
1184
+ @testing .numpy_cupy_allclose (
1185
+ rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 },
1186
+ type_check = has_support_aspect64 (),
1187
+ )
1179
1188
def test_trapz_1dim_with_dx (self , xp , dtype ):
1180
1189
a = testing .shaped_arange ((5 ,), xp , dtype )
1181
1190
return xp .trapezoid (a , dx = 0.1 )
1182
1191
1183
1192
@testing .for_all_dtypes ()
1184
- @testing .numpy_cupy_allclose (rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 })
1193
+ @testing .numpy_cupy_allclose (
1194
+ rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 },
1195
+ type_check = has_support_aspect64 (),
1196
+ )
1185
1197
def test_trapz_2dim_without_axis (self , xp , dtype ):
1186
1198
a = testing .shaped_arange ((4 , 5 ), xp , dtype )
1187
1199
return xp .trapezoid (a )
1188
1200
1189
1201
@testing .for_all_dtypes ()
1190
- @testing .numpy_cupy_allclose (rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 })
1202
+ @testing .numpy_cupy_allclose (
1203
+ rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 },
1204
+ type_check = has_support_aspect64 (),
1205
+ )
1191
1206
def test_trapz_2dim_with_axis (self , xp , dtype ):
1192
1207
a = testing .shaped_arange ((4 , 5 ), xp , dtype )
1193
1208
return xp .trapezoid (a , axis = - 2 )
1194
1209
1195
1210
@testing .for_all_dtypes ()
1196
- @testing .numpy_cupy_allclose (rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 })
1211
+ @testing .numpy_cupy_allclose (
1212
+ rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 },
1213
+ type_check = has_support_aspect64 (),
1214
+ )
1197
1215
def test_trapz_2dim_with_x_and_axis (self , xp , dtype ):
1198
1216
a = testing .shaped_arange ((4 , 5 ), xp , dtype )
1199
1217
x = testing .shaped_arange ((5 ,), xp , dtype )
1200
1218
return xp .trapezoid (a , x = x , axis = 1 )
1201
1219
1202
1220
@testing .for_all_dtypes ()
1203
- @testing .numpy_cupy_allclose (rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 })
1221
+ @testing .numpy_cupy_allclose (
1222
+ rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 },
1223
+ type_check = has_support_aspect64 (),
1224
+ )
1204
1225
def test_trapz_2dim_with_dx_and_axis (self , xp , dtype ):
1205
1226
a = testing .shaped_arange ((4 , 5 ), xp , dtype )
1206
1227
return xp .trapezoid (a , dx = 0.1 , axis = 1 )
1207
1228
1208
1229
@testing .for_all_dtypes ()
1209
- @testing .numpy_cupy_allclose (rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 })
1230
+ @testing .numpy_cupy_allclose (
1231
+ rtol = {numpy .float16 : 1e-1 , "default" : 1e-7 },
1232
+ type_check = has_support_aspect64 (),
1233
+ )
1210
1234
def test_trapz_1dim_with_x_and_dx (self , xp , dtype ):
1211
1235
a = testing .shaped_arange ((5 ,), xp , dtype )
1212
1236
x = testing .shaped_arange ((5 ,), xp , dtype )
0 commit comments