You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened:
When I use resample(time='1d').sum(dim='time') to resample a time series with NaNs, the resampled result gives me 0s instead of NaNs, while NaNs should be the correct answer.
What you expected to happen:
NaNs should be the correct answer.
Minimal Complete Verifiable Example:
importxarrayasxrdates=pd.date_range('20200101', '20200601', freq='h')
data=np.linspace(0, 10, num=len(dates))
data[0:30*24] =np.nanda=xr.DataArray(data, coords=[dates], dims='time')
da.plot()
# Instead of NaNs, the resampled time series in January 20202 give us 0s, which not right.da.resample(time='1d', skipna=True).sum(dim='time', skipna=True).plot()
Anything else we need to know?:
Did I misunderstand something here? Thanks!
Environment:
xarray - '0.15.1'
Output of xr.show_versions()
xarray - '0.15.1'
The text was updated successfully, but these errors were encountered:
What happened:
When I use
resample(time='1d').sum(dim='time')
to resample a time series with NaNs, the resampled result gives me 0s instead of NaNs, while NaNs should be the correct answer.What you expected to happen:
NaNs should be the correct answer.
Minimal Complete Verifiable Example:
Anything else we need to know?:
Did I misunderstand something here? Thanks!
Environment:
xarray - '0.15.1'
Output of xr.show_versions()
xarray - '0.15.1'
The text was updated successfully, but these errors were encountered: