Chunks

Dask array composed of blocks of underlying array like structures such as numpy etc. Each of these blocks are called chunks.

1 2 3   4 5 5
6 6 7   7 7 7

5 5 5   9 9 9
6 6 6   7 7 7

Chunks can be specified different formats like shown below.

dask.array.ones((3, 4), chunks=1)
 
# or
 
dask.array.ones((3, 4), chunks=(1, 2))
 
# or
 
dask.array.ones((3, 4), chunks=((2, 1), (2, 2)))
 
# or
 
dask.array.ones((3, 4), chunks={0: 2, 1: 2})

First specifies single chunk size for all the dimensions. Second specifies chunk sizes of each dimension separately. Third one specifies more explicitly chunk sizes for blocks along each dimension. Fourth is similar to second approach with dictionary format.

Note

Chunk size means total number of elements in the chunk or block.