Working with numpy-like arrays


This feature should be considered experimental. Please report any bug you may find on xarray’s github repository.

Numpy-like arrays (duck array) extend the numpy.ndarray with additional features, like propagating physical units or a different layout in memory.

DataArray and Dataset objects can wrap these duck arrays, as long as they satisfy certain conditions (see Integrating with duck arrays).


For dask support see Parallel computing with Dask.

Missing features

Most of the API does support duck array objects, but there are a few areas where the code will still cast to numpy arrays:

Extensions using duck arrays

Here’s a list of libraries extending xarray to make working with wrapped duck arrays easier: