Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
96
def
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
103
def
test_coarsen_unaligned_shape():
Callers
nothing calls this directly
Calls
3
coarsen
Function · 0.90
randint
Method · 0.45
sum
Method · 0.45
Tested by
no test coverage detected