@@ -206,34 +206,39 @@ def test_choose(self, xp, dtype):
206
206
c = testing .shaped_arange ((3 , 4 ), xp , dtype )
207
207
return a .choose (c )
208
208
209
+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
209
210
@testing .for_all_dtypes ()
210
211
@testing .numpy_cupy_array_equal ()
211
212
def test_choose_broadcast (self , xp , dtype ):
212
213
a = xp .array ([[1 , 0 , 1 ], [0 , 1 , 0 ], [1 , 0 , 1 ]])
213
214
c = xp .array ([- 10 , 10 ]).astype (dtype )
214
215
return a .choose (c )
215
216
217
+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
216
218
@testing .for_all_dtypes ()
217
219
@testing .numpy_cupy_array_equal ()
218
220
def test_choose_broadcast2 (self , xp , dtype ):
219
221
a = xp .array ([0 , 1 ])
220
222
c = testing .shaped_arange ((3 , 5 , 2 ), xp , dtype )
221
223
return a .choose (c )
222
224
225
+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
223
226
@testing .for_all_dtypes ()
224
227
@testing .numpy_cupy_array_equal ()
225
228
def test_choose_wrap (self , xp , dtype ):
226
229
a = xp .array ([0 , 3 , - 1 , 5 ])
227
230
c = testing .shaped_arange ((3 , 4 ), xp , dtype )
228
231
return a .choose (c , mode = "wrap" )
229
232
233
+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
230
234
@testing .for_all_dtypes ()
231
235
@testing .numpy_cupy_array_equal ()
232
236
def test_choose_clip (self , xp , dtype ):
233
237
a = xp .array ([0 , 3 , - 1 , 5 ])
234
238
c = testing .shaped_arange ((3 , 4 ), xp , dtype )
235
239
return a .choose (c , mode = "clip" )
236
240
241
+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
237
242
@testing .with_requires ("numpy>=1.19" )
238
243
def test_unknown_clip (self ):
239
244
for xp in (numpy , cupy ):
@@ -242,12 +247,14 @@ def test_unknown_clip(self):
242
247
with pytest .raises (ValueError ):
243
248
a .choose (c , mode = "unknown" )
244
249
250
+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
245
251
def test_raise (self ):
246
252
a = cupy .array ([2 ])
247
253
c = cupy .array ([[0 , 1 ]])
248
254
with self .assertRaises (ValueError ):
249
255
a .choose (c )
250
256
257
+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
251
258
@testing .for_all_dtypes ()
252
259
def test_choose_broadcast_fail (self , dtype ):
253
260
for xp in (numpy , cupy ):
0 commit comments