@@ -239,16 +239,28 @@ def test_ddof_nans(func, dtype):
239
239
240
240
241
241
@pytest .mark .parametrize ("dtype" , DTYPES )
242
- @pytest .mark .parametrize ("func" , (bn .nanmean , bn .nanmax ), ids = lambda x : x .__name__ )
243
- def test_reduce_with_unordered_strides_ccontig (func , dtype ) -> None :
242
+ @pytest .mark .parametrize (
243
+ ("func" , "expected" ),
244
+ [(bn .nansum , 1000 ),
245
+ (bn .nanmean , 1 ),
246
+ (bn .nanmax , 1 )],
247
+ ids = lambda x : x .__name__ if not isinstance (x , int ) else x
248
+ )
249
+ def test_reduce_with_unordered_strides_ccontig (func , expected , dtype ) -> None :
244
250
array = np .ones ((1 , 500 , 2 ), dtype = dtype ).transpose ((1 ,2 ,0 ))
245
251
result = func (array )
246
- assert result == 1000
252
+ assert result == expected
247
253
248
254
@pytest .mark .parametrize ("dtype" , DTYPES )
249
- @pytest .mark .parametrize ("func" , (bn .nanmean , bn .nanmax ), ids = lambda x : x .__name__ )
250
- def test_reduce_with_unordered_strides_fcontig (func , dtype ) -> None :
255
+ @pytest .mark .parametrize (
256
+ ("func" , "expected" ),
257
+ [(bn .nansum , 1000 ),
258
+ (bn .nanmean , 1 ),
259
+ (bn .nanmax , 1 )],
260
+ ids = lambda x : x .__name__ if not isinstance (x , int ) else x
261
+ )
262
+ def test_reduce_with_unordered_strides_fcontig (func , expected , dtype ) -> None :
251
263
array = np .ones ((1 , 500 , 2 ), dtype = dtype ).transpose ((0 ,2 ,1 ))
252
264
result = func (array )
253
- assert result == 1000
265
+ assert result == expected
254
266
0 commit comments