34
34
@pytest .mark .parametrize ("min_count" , [None , 1 , 3 ])
35
35
@pytest .mark .parametrize ("add_nan" , [True , False ])
36
36
@pytest .mark .parametrize ("skipna" , [True , False ])
37
- def test_xarray_reduce (skipna , add_nan , min_count , engine_no_numba , reindex ):
38
- engine = engine_no_numba
37
+ def test_xarray_reduce (skipna , add_nan , min_count , engine , reindex ):
39
38
if skipna is False and min_count is not None :
40
39
pytest .skip ()
41
40
@@ -91,11 +90,9 @@ def test_xarray_reduce(skipna, add_nan, min_count, engine_no_numba, reindex):
91
90
# TODO: sort
92
91
@pytest .mark .parametrize ("pass_expected_groups" , [True , False ])
93
92
@pytest .mark .parametrize ("chunk" , (pytest .param (True , marks = requires_dask ), False ))
94
- def test_xarray_reduce_multiple_groupers (pass_expected_groups , chunk , engine_no_numba ):
93
+ def test_xarray_reduce_multiple_groupers (pass_expected_groups , chunk , engine ):
95
94
if chunk and pass_expected_groups is False :
96
95
pytest .skip ()
97
- engine = engine_no_numba
98
-
99
96
arr = np .ones ((4 , 12 ))
100
97
labels = np .array (["a" , "a" , "c" , "c" , "c" , "b" , "b" , "c" , "c" , "b" , "b" , "f" ])
101
98
labels2 = np .array ([1 , 2 , 2 , 1 ])
@@ -140,10 +137,9 @@ def test_xarray_reduce_multiple_groupers(pass_expected_groups, chunk, engine_no_
140
137
141
138
@pytest .mark .parametrize ("pass_expected_groups" , [True , False ])
142
139
@pytest .mark .parametrize ("chunk" , (pytest .param (True , marks = requires_dask ), False ))
143
- def test_xarray_reduce_multiple_groupers_2 (pass_expected_groups , chunk , engine_no_numba ):
140
+ def test_xarray_reduce_multiple_groupers_2 (pass_expected_groups , chunk , engine ):
144
141
if chunk and pass_expected_groups is False :
145
142
pytest .skip ()
146
- engine = engine_no_numba
147
143
148
144
arr = np .ones ((2 , 12 ))
149
145
labels = np .array (["a" , "a" , "c" , "c" , "c" , "b" , "b" , "c" , "c" , "b" , "b" , "f" ])
@@ -218,8 +214,7 @@ def test_xarray_reduce_cftime_var(engine, indexer, expected_groups, func):
218
214
219
215
@requires_cftime
220
216
@requires_dask
221
- def test_xarray_reduce_single_grouper (engine_no_numba ):
222
- engine = engine_no_numba
217
+ def test_xarray_reduce_single_grouper (engine ):
223
218
# DataArray
224
219
ds = xr .Dataset (
225
220
{
@@ -326,17 +321,15 @@ def test_rechunk_for_blockwise(inchunks, expected):
326
321
# TODO: dim=None, dim=Ellipsis, groupby unindexed dim
327
322
328
323
329
- def test_groupby_duplicate_coordinate_labels (engine_no_numba ):
330
- engine = engine_no_numba
324
+ def test_groupby_duplicate_coordinate_labels (engine ):
331
325
# fix for http://stackoverflow.com/questions/38065129
332
326
array = xr .DataArray ([1 , 2 , 3 ], [("x" , [1 , 1 , 2 ])])
333
327
expected = xr .DataArray ([3 , 3 ], [("x" , [1 , 2 ])])
334
328
actual = xarray_reduce (array , array .x , func = "sum" , engine = engine )
335
329
assert_equal (expected , actual )
336
330
337
331
338
- def test_multi_index_groupby_sum (engine_no_numba ):
339
- engine = engine_no_numba
332
+ def test_multi_index_groupby_sum (engine ):
340
333
# regression test for xarray GH873
341
334
ds = xr .Dataset (
342
335
{"foo" : (("x" , "y" , "z" ), np .ones ((3 , 4 , 2 )))},
@@ -362,8 +355,7 @@ def test_multi_index_groupby_sum(engine_no_numba):
362
355
363
356
364
357
@pytest .mark .parametrize ("chunks" , (None , pytest .param (2 , marks = requires_dask )))
365
- def test_xarray_groupby_bins (chunks , engine_no_numba ):
366
- engine = engine_no_numba
358
+ def test_xarray_groupby_bins (chunks , engine ):
367
359
array = xr .DataArray ([1 , 1 , 1 , 1 , 1 ], dims = "x" )
368
360
labels = xr .DataArray ([1 , 1.5 , 1.9 , 2 , 3 ], dims = "x" , name = "labels" )
369
361
@@ -532,11 +524,10 @@ def test_alignment_error():
532
524
@pytest .mark .parametrize ("dtype_out" , [np .float64 , "float64" , np .dtype ("float64" )])
533
525
@pytest .mark .parametrize ("dtype" , [np .float32 , np .float64 ])
534
526
@pytest .mark .parametrize ("chunk" , (pytest .param (True , marks = requires_dask ), False ))
535
- def test_dtype (add_nan , chunk , dtype , dtype_out , engine_no_numba ):
536
- if engine_no_numba == "numbagg" :
527
+ def test_dtype (add_nan , chunk , dtype , dtype_out , engine ):
528
+ if engine == "numbagg" :
537
529
# https://github.com/numbagg/numbagg/issues/121
538
530
pytest .skip ()
539
- engine = engine_no_numba
540
531
xp = dask .array if chunk else np
541
532
data = xp .linspace (0 , 1 , 48 , dtype = dtype ).reshape ((4 , 12 ))
542
533
0 commit comments