(dtype, dask, func)
| 845 | @pytest.mark.parametrize("dask", [False, True]) |
| 846 | @pytest.mark.parametrize("func", ["sum", "prod"]) |
| 847 | def test_min_count_nd(dtype, dask, func): |
| 848 | if dask and not has_dask: |
| 849 | pytest.skip("requires dask") |
| 850 | |
| 851 | min_count = 3 |
| 852 | dim_num = 3 |
| 853 | da = construct_dataarray(dim_num, dtype, contains_nan=True, dask=dask) |
| 854 | |
| 855 | # If using Dask, the function call should be lazy. |
| 856 | with raise_if_dask_computes(): |
| 857 | actual = getattr(da, func)( |
| 858 | dim=["x", "y", "z"], skipna=True, min_count=min_count |
| 859 | ) |
| 860 | |
| 861 | # Supplying all dims is equivalent to supplying `...` or `None` |
| 862 | expected = getattr(da, func)(dim=..., skipna=True, min_count=min_count) |
| 863 | |
| 864 | assert_allclose(actual, expected) |
| 865 | assert_dask_array(actual, dask) |
| 866 | |
| 867 | |
| 868 | @pytest.mark.parametrize("dask", [False, True]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…