刚刚升级到python3.8,我已将xarray更新到v.0.16,但现在我总是收到以下警告:
/usr/local/lib/python3.8/dist-packages/xarray/core/common.py:1123: FutureWarning: 'base' in .resample() and in Grouper() is deprecated.
The new arguments that you should use are 'offset' or 'origin'.
>>> df.resample(freq="3s", base=2)
becomes:
>>> df.resample(freq="3s", offset="2s")
grouper = pd.Grouper(
我脚本中唯一使用的点。重采样是:
mydata = xr.open_dataset(ncfile).resample(time='3H').reduce(np.mean)
但我不知道如何改变它以避免警告
在xarray中更新之前,可以通过调用^{} 忽略警告
欢迎您在GitHub上为xarray(甚至是PR)打开一个问题
相关问题 更多 >
编程相关推荐