🍾 Xarray is now 10 years old! 🎉

xarray.DataArray.values

Contents

xarray.DataArray.values#

property DataArray.values#

The array’s data converted to numpy.ndarray.

This will attempt to convert the array naively using np.array(), which will raise an error if the array type does not support coercion like this (e.g. cupy).

Note that this array is not copied; operations on it follow numpy’s rules of what generates a view vs. a copy, and changes to this array may be reflected in the DataArray as well.