File tree 1 file changed +21
-2
lines changed 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 26
26
from xarray import DataArray , Dataset
27
27
from xarray .core .groupby import GroupBy
28
28
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 ( # type:ignore[import-not-found,no-redef,unused-ignore]
32
+ Coarsen ,
33
+ Rolling ,
34
+ )
35
+ except ImportError :
36
+ from xarray .computation .rolling import ( # type:ignore[import-not-found,no-redef,unused-ignore]
37
+ Coarsen ,
38
+ Rolling ,
39
+ )
40
+
41
+ try :
42
+ from xarray .core .weighted import (
43
+ Weighted , # type:ignore[import-not-found,no-redef,unused-ignore]
44
+ )
45
+ except ImportError :
46
+ from xarray .computation .weighted import ( # type:ignore[import-not-found,no-redef,unused-ignore]
47
+ Weighted ,
48
+ )
49
+
31
50
32
51
from . import parametric , sgrid
33
52
from .criteria import (
You can’t perform that action at this time.
0 commit comments