(func)
| 916 | |
| 917 | @pytest.mark.parametrize("func", ["nanvar", "nanstd"]) |
| 918 | def test_nan_func_does_not_warn(func): |
| 919 | # non-regression test for #6105 |
| 920 | x = np.ones((10,)) * np.nan |
| 921 | x[0] = 1 |
| 922 | x[1] = 2 |
| 923 | d = da.from_array(x, chunks=2) |
| 924 | with warnings.catch_warnings(record=True) as rec: |
| 925 | getattr(da, func)(d).compute() |
| 926 | assert not rec # did not warn |
| 927 | |
| 928 | |
| 929 | @pytest.mark.parametrize("chunks", list(permutations(((2, 1) * 8, (3,) * 8, (6,) * 4)))) |