(size, chunks)
| 985 | "size, chunks", [((100, 2), (50, 2)), ((100, 2), (37, 1)), ((100,), (55,))] |
| 986 | ) |
| 987 | def test_shuffle_slice(size, chunks): |
| 988 | x = da.random.default_rng().integers(0, 1000, size=size, chunks=chunks) |
| 989 | index = np.arange(len(x)) |
| 990 | np.random.default_rng().shuffle(index) |
| 991 | |
| 992 | a = x[index] |
| 993 | b = shuffle_slice(x, index) |
| 994 | assert_eq(a, b) |
| 995 | |
| 996 | index = np.arange(1, len(x)).tolist() |
| 997 | index.append(0) |
| 998 | index = np.array(index) |
| 999 | a = x[index] |
| 1000 | b = shuffle_slice(x, index) |
| 1001 | assert_eq(a, b) |
| 1002 | |
| 1003 | |
| 1004 | def test_unknown_chunks_length_one(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…