(dim_num, dtype, dask, func, aggdim, contains_nan, skipna)
| 826 | @pytest.mark.parametrize("contains_nan", [True, False]) |
| 827 | @pytest.mark.parametrize("skipna", [True, False, None]) |
| 828 | def test_min_count(dim_num, dtype, dask, func, aggdim, contains_nan, skipna): |
| 829 | if dask and not has_dask: |
| 830 | pytest.skip("requires dask") |
| 831 | |
| 832 | da = construct_dataarray(dim_num, dtype, contains_nan=contains_nan, dask=dask) |
| 833 | min_count = 3 |
| 834 | |
| 835 | # If using Dask, the function call should be lazy. |
| 836 | with raise_if_dask_computes(): |
| 837 | actual = getattr(da, func)(dim=aggdim, skipna=skipna, min_count=min_count) |
| 838 | |
| 839 | expected = series_reduce(da, func, skipna=skipna, dim=aggdim, min_count=min_count) |
| 840 | assert_allclose(actual, expected) |
| 841 | assert_dask_array(actual, dask) |
| 842 | |
| 843 | |
| 844 | @pytest.mark.parametrize("dtype", [float, int, np.float32, np.bool_]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…