Skip to content

Commit 9a53fec

Browse files
committed
Revert "Also special case pint"
This reverts commit b33aded.
1 parent b33aded commit 9a53fec

File tree

2 files changed

+1
-14
lines changed

2 files changed

+1
-14
lines changed

xarray/core/dataset.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
)
8282
from .missing import get_clean_interp_index
8383
from .options import OPTIONS, _get_keep_attrs
84-
from .pycompat import is_duck_dask_array, pint_array_type, sparse_array_type
84+
from .pycompat import is_duck_dask_array, sparse_array_type
8585
from .utils import (
8686
Default,
8787
Frozen,
@@ -3849,12 +3849,6 @@ def unstack(
38493849
or sparse
38503850
# numpy full_like only added `shape` in 1.17
38513851
or LooseVersion(np.__version__) < LooseVersion("1.17")
3852-
# pint doesn't implement `np.full_like` in a way that's
3853-
# currently compatible.
3854-
# https://github.com/pydata/xarray/pull/4746#issuecomment-753425173
3855-
or any(
3856-
isinstance(v.data, pint_array_type) for v in self.variables.values()
3857-
)
38583852
):
38593853
result = result._unstack_full_reindex(dim, fill_value, sparse)
38603854
else:

xarray/core/pycompat.py

-7
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,3 @@ def is_duck_dask_array(x):
3535
cupy_array_type = (cupy.ndarray,)
3636
except ImportError: # pragma: no cover
3737
cupy_array_type = ()
38-
39-
try:
40-
import pint
41-
42-
pint_array_type = (pint.Quantity,)
43-
except ImportError: # pragma: no cover
44-
pint_array_type = ()

0 commit comments

Comments
 (0)