I know that I can use the numpy nanmean function to take the mean of a numpy array, while ignoring NaN values. Is there an analogous way to accomplish this with xarray? I will give an example...
numpy_array=[1,2,3,4,float('nan'),5]
np.mean(numpy_array)
> NaN
np.nanmean(numpy_array)
> 3.0
In xarray, I can do
xarray_example.mean(dim='dimension')
How can I change this to a nanmean?
Thanks.