chunks
normalize_chunks #
Given an xarray.DataArray, normalize a chunk size against that array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
array |
DataArray
|
An |
required |
chunk_size |
str | int | Sequence[int] | dict[Hashable, int]
|
A specification of a chunk size. |
required |
Returns:
| Type | Description |
|---|---|
dict[Hashable, int]
|
An xarray-compatible specification of chunk sizes. |
Source code in src/xarray_multiscale/chunks.py
align_chunks #
Ensure that all chunks of a dask array are divisible by scale_factors, rechunking the array if necessary.