Skip to content

Commit 5909b5d

Browse files
committed
fix pandas v2.1 issues, various
1 parent 9876d88 commit 5909b5d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pint_pandas/pint_array.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,8 @@ def take(self, indices, allow_fill=False, fill_value=None):
470470
Examples
471471
--------
472472
"""
473-
from pandas.core.algorithms import take, is_scalar
473+
from pandas.core.algorithms import take
474+
from pandas.api.types import is_scalar
474475

475476
data = self._data
476477
if allow_fill and fill_value is None:

pint_pandas/testsuite/test_pandas_extensiontests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ def _check_divmod_op(self, s, op, other, exc=None):
343343
divmod(s, other)
344344

345345
def _get_exception(self, data, op_name):
346-
if data.data.dtype == pd.core.dtypes.dtypes.PandasDtype("complex128"):
346+
if data.data.dtype == dtypemap[np.complex128]:
347347
if op_name in ["__floordiv__", "__rfloordiv__", "__mod__", "__rmod__"]:
348348
return op_name, TypeError
349349
if op_name in ["__pow__", "__rpow__"]:

0 commit comments

Comments
 (0)