sgkit
sgkit copied to clipboard
Add ChunkType to sgkit.typing
IO functions often take Dask chunk specifications and my type hints for those have been inconsistent. We should add a ChunkType or something like it so it is more clear when a chunk specification is a pass-through to Dask.
This would be a good guide (xr.DataArray.chunks):
chunks: Union[
None,
Number,
Tuple[Number, ...],
Tuple[Tuple[Number, ...], ...],
Mapping[Hashable, Union[None, Number, Tuple[Number, ...]]],
] = None,
Looks like mypy needs int rather than Number now: https://github.com/pydata/xarray/commit/a73628317acd73cb55f03ad036708d493f4a8b54