(shape_chunks, dtype)
| 1072 | @pytest.mark.parametrize("shape_chunks", [((50, 4), (10, 2)), ((50,), (10,))]) |
| 1073 | @pytest.mark.parametrize("dtype", ["u4", np.float32, None, np.int64]) |
| 1074 | def test_nan_empty_like(shape_chunks, dtype): |
| 1075 | shape, chunks = shape_chunks |
| 1076 | x1 = da.random.standard_normal(size=shape, chunks=chunks) |
| 1077 | y1 = x1[x1 < 0.5] |
| 1078 | x2 = x1.compute() |
| 1079 | y2 = x2[x2 < 0.5] |
| 1080 | a_da = da.empty_like(y1, dtype=dtype).compute() |
| 1081 | a_np = np.empty_like(y2, dtype=dtype) |
| 1082 | assert a_da.shape == a_np.shape |
| 1083 | assert a_da.dtype == a_np.dtype |
| 1084 | |
| 1085 | |
| 1086 | @pytest.mark.parametrize("val", [0, 0.0, 99, -1]) |
nothing calls this directly
no test coverage detected
searching dependent graphs…