MCPcopy Create free account
hub / github.com/dask/dask / test_nan_func_does_not_warn

Function test_nan_func_does_not_warn

dask/array/tests/test_reductions.py:918–926  ·  view source on GitHub ↗
(func)

Source from the content-addressed store, hash-verified

916
917@pytest.mark.parametrize("func", ["nanvar", "nanstd"])
918def 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))))

Callers

nothing calls this directly

Calls 2

onesMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected