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

Function test_stack_rechunk

dask/array/tests/test_array_core.py:677–686  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

675
676
677def 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
689def test_stack_unknown_chunksizes():

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
randomMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected