Skip to content

Commit 8ce9d0a

Browse files
committed
Fix imports again
1 parent cb5e888 commit 8ce9d0a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

cf_xarray/accessor.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,17 @@
2626
from xarray import DataArray, Dataset
2727
from xarray.core.groupby import GroupBy
2828
from xarray.core.resample import Resample
29-
from xarray.core.rolling import Coarsen, Rolling
30-
from xarray.core.weighted import Weighted
29+
30+
try:
31+
from xarray.core.rolling import Coarsen, Rolling
32+
except ImportError:
33+
from xarray.computation.rolling import Coarsen, Rolling
34+
35+
try:
36+
from xarray.core.weighted import Weighted
37+
except ImportError:
38+
from xarray.computation.weighted import Weighted
39+
3140

3241
from . import parametric, sgrid
3342
from .criteria import (

0 commit comments

Comments
 (0)