Open
Description
From:
https://xarray.pydata.org/en/stable/dask.html
Tip
For the majority of NumPy functions that are already wrapped by Dask, it’s usually a better idea to use the pre-existing dask.array function, by using either a pre-existing xarray methods or apply_ufunc() with dask='allowed'. Dask can often have a more efficient implementation that makes use of the specialized structure of a problem, unlike the generic speedups offered by dask='parallelized'.
So, I simply set dask="allowed"
return xr.apply_ufunc(
_rmse,
a,
b,
weights,
input_core_dims=input_core_dims,
kwargs={"axis": axis, "skipna": skipna},
dask="allowed",
output_dtypes=[float],
keep_attrs=keep_attrs,
)