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

Function test_coarsen

dask/array/tests/test_chunk.py:96–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94
95
96def test_coarsen():
97 x = np.random.randint(10, size=(24, 24))
98 y = coarsen(np.sum, x, {0: 2, 1: 4})
99 assert y.shape == (12, 6)
100 assert y[0, 0] == np.sum(x[:2, :4])
101
102
103def test_coarsen_unaligned_shape():

Callers

nothing calls this directly

Calls 3

coarsenFunction · 0.90
randintMethod · 0.45
sumMethod · 0.45

Tested by

no test coverage detected