xarray.DataArray.persist

xarray.DataArray.persist#

DataArray.persist(**kwargs)[source]#

Trigger computation in constituent dask arrays

This keeps them as dask arrays but encourages them to keep data in memory. This is particularly useful when on a distributed machine. When on a single machine consider using .compute() instead. Like compute (but unlike load), the original dataset is left unaltered.

Parameters:

**kwargs (dict) – Additional keyword arguments passed on to dask.persist.

Returns:

object (DataArray) – New object with all dask-backed data and coordinates as persisted dask arrays.

See also

dask.persist