()
| 675 | |
| 676 | |
| 677 | def test_stack_rechunk(): |
| 678 | rng = da.random.default_rng() |
| 679 | x = rng.random(10, chunks=5) |
| 680 | y = rng.random(10, chunks=4) |
| 681 | |
| 682 | z = da.stack([x, y], axis=0) |
| 683 | assert z.shape == (2, 10) |
| 684 | assert z.chunks == ((1, 1), (4, 1, 3, 2)) |
| 685 | |
| 686 | assert_eq(z, np.stack([x.compute(), y.compute()], axis=0)) |
| 687 | |
| 688 | |
| 689 | def test_stack_unknown_chunksizes(): |