xarray.DataArray.compute#

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

Trigger loading data into memory and return a new dataarray.

Data will be computed and/or loaded from disk or a remote source.

Unlike .load, the original dataarray is left unaltered.

Normally, it should not be necessary to call this method in user code, because all xarray functions should either work on deferred data or load data automatically. However, this method can be necessary when working with many file objects on disk.

Parameters:

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

Returns:

object (DataArray) – New object with the data and all coordinates as in-memory arrays.

See also

dask.compute, DataArray.load, DataArray.load_async, Dataset.compute, Variable.compute