Skip to content

Commit b031b45

Browse files
authored
Explicit xarray imports (#343)
1 parent aac9a15 commit b031b45

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

cf_xarray/accessor.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
import xarray as xr
2525
from xarray import DataArray, Dataset
2626
from xarray.core.arithmetic import SupportsArithmetic
27+
from xarray.core.groupby import GroupBy
28+
from xarray.core.resample import Resample
29+
from xarray.core.rolling import Coarsen, Rolling
30+
from xarray.core.weighted import Weighted
2731

2832
from .criteria import cf_role_criteria, coordinate_criteria, regex
2933
from .helpers import bounds_to_vertices
@@ -38,13 +42,7 @@
3842
)
3943

4044
#: Classes wrapped by cf_xarray.
41-
_WRAPPED_CLASSES = (
42-
xr.core.resample.Resample,
43-
xr.core.groupby.GroupBy,
44-
xr.core.rolling.Rolling,
45-
xr.core.rolling.Coarsen,
46-
xr.core.weighted.Weighted,
47-
)
45+
_WRAPPED_CLASSES = (Resample, GroupBy, Rolling, Coarsen, Weighted)
4846

4947
#: `axis` names understood by cf_xarray
5048
_AXIS_NAMES = ("X", "Y", "Z", "T")

0 commit comments

Comments
 (0)