Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explicit xarray imports #343

Merged
merged 2 commits into from
Jun 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions cf_xarray/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
import xarray as xr
from xarray import DataArray, Dataset
from xarray.core.arithmetic import SupportsArithmetic
from xarray.core.groupby import GroupBy
from xarray.core.resample import Resample
from xarray.core.rolling import Coarsen, Rolling
from xarray.core.weighted import Weighted

from .criteria import cf_role_criteria, coordinate_criteria, regex
from .helpers import bounds_to_vertices
Expand All @@ -38,13 +42,7 @@
)

#: Classes wrapped by cf_xarray.
_WRAPPED_CLASSES = (
xr.core.resample.Resample,
xr.core.groupby.GroupBy,
xr.core.rolling.Rolling,
xr.core.rolling.Coarsen,
xr.core.weighted.Weighted,
)
_WRAPPED_CLASSES = (Resample, GroupBy, Rolling, Coarsen, Weighted)

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