```
====================================================================================================== FAILURES =======================================================================================================
___________________________________________________________________________________________ test_cftime_datetime_mean[True] ___________________________________________________________________________________________
dask = True
@requires_cftime
@pytest.mark.parametrize(""dask"", [False, True])
def test_cftime_datetime_mean(dask):
if dask and not has_dask:
pytest.skip(""requires dask"")
times = cftime_range(""2000"", periods=4)
da = DataArray(times, dims=[""time""])
da_2d = DataArray(times.values.reshape(2, 2))
if dask:
da = da.chunk({""time"": 2})
da_2d = da_2d.chunk({""dim_0"": 2})
expected = da.isel(time=0)
# one compute needed to check the array contains cftime datetimes
with raise_if_dask_computes(max_computes=1):
> result = da.isel(time=0).mean()
/Users/spencer/software/xarray/xarray/tests/test_duck_array_ops.py:342:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/Users/spencer/software/xarray/xarray/core/_reductions.py:1478: in mean
return self.reduce(
/Users/spencer/software/xarray/xarray/core/dataarray.py:2930: in reduce
var = self.variable.reduce(func, dim, axis, keep_attrs, keepdims, **kwargs)
/Users/spencer/software/xarray/xarray/core/variable.py:1854: in reduce
data = func(self.data, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
array = dask.array