xarray.DataTree.chunk (original) (raw)

DataTree.chunk(chunks={}, name_prefix='xarray-', token=None, lock=False, inline_array=False, chunked_array_type=None, from_array_kwargs=None, **chunks_kwargs)[source]#

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

Non-dask arrays in this tree 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.

Along datetime-like dimensions, a groupers.TimeResampler object is also accepted.

Parameters:

Returns:

chunked (xarray.DataTree)