From 0d9387378a4cb48abfc9e50e89fd050d2552bfe0 Mon Sep 17 00:00:00 2001 From: Maximilian Roos Date: Sat, 7 Oct 2023 18:14:44 -0700 Subject: [PATCH] Fix `GroupBy` import Not sure why this only breaks tests for me, vs. in CI, but hopefully no downside to this change... --- xarray/tests/test_units.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xarray/tests/test_units.py b/xarray/tests/test_units.py index d89a74e4fba..7e1105e2e5d 100644 --- a/xarray/tests/test_units.py +++ b/xarray/tests/test_units.py @@ -305,11 +305,13 @@ def __call__(self, obj, *args, **kwargs): all_args = merge_args(self.args, args) all_kwargs = {**self.kwargs, **kwargs} + from xarray.core.groupby import GroupBy + xarray_classes = ( xr.Variable, xr.DataArray, xr.Dataset, - xr.core.groupby.GroupBy, + GroupBy, ) if not isinstance(obj, xarray_classes):