-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand groupby_reduce property tests (#385)
* Expand groupby_reduce property tests * Add back var, std * cast quantile result * Revert "Add back var, std" This reverts commit 805b8d3. * pin numpy in benchmark env * Add benchmarks as test
- Loading branch information
Showing
4 changed files
with
38 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ dependencies: | |
- build | ||
- cachey | ||
- dask-core | ||
- numpy>=1.22 | ||
- numpy<2 | ||
- mamba | ||
- pip | ||
- python=3.10 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Run asv benchmarks as tests | ||
|
||
import pytest | ||
|
||
pytest.importorskip("dask") | ||
|
||
from asv_bench.benchmarks import reduce | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"problem", [reduce.ChunkReduce1D, reduce.ChunkReduce2D, reduce.ChunkReduce2DAllAxes] | ||
) | ||
def test_reduce(problem) -> None: | ||
testcase = problem() | ||
testcase.setup() | ||
for args in zip(*testcase.time_reduce.params): | ||
testcase.time_reduce(*args) | ||
|
||
|
||
def test_reduce_bare() -> None: | ||
testcase = reduce.ChunkReduce1D() | ||
testcase.setup() | ||
for args in zip(*testcase.time_reduce_bare.params): | ||
testcase.time_reduce_bare(*args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters