Dataset.chunk(self, chunks: Union[NoneType, numbers.Number, Mapping[Hashable, Union[NoneType, numbers.Number, Tuple[numbers.Number, ...]]]] = None, name_prefix: str = 'xarray-', token: str = None, lock: bool = False) → 'Dataset'

Coerce all arrays in this dataset into dask arrays with the given chunks.

Non-dask arrays in this dataset will be converted to dask arrays. Dask arrays will be rechunked to the given chunk sizes.

If neither chunks is not provided for one or more dimensions, chunk sizes along that dimension will not be updated; non-dask arrays will be converted into dask arrays with a single block.

  • chunks (int or mapping, optional) – Chunk sizes along each dimension, e.g., 5 or {'x': 5, 'y': 5}.

  • name_prefix (str, optional) – Prefix for the name of any new dask arrays.

  • token (str, optional) – Token uniquely identifying this dataset.

  • lock (optional) – Passed on to dask.array.from_array(), if the array is not already as dask array.



Return type