Skip to content

Commit a9cdf6e

Browse files
author
Laurent Mutricy
committed
fixing pandas/tests/dtypes/test_generic.py::TestABCClasses::test_abc_hierarchy
1 parent 78e50d9 commit a9cdf6e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

pandas/core/algorithms.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
ABCExtensionArray,
6969
ABCIndex,
7070
ABCMultiIndex,
71+
ABCNumpyExtensionArray,
7172
ABCSeries,
7273
ABCTimedeltaArray,
7374
)
@@ -1161,7 +1162,10 @@ def take(
11611162
... )
11621163
array([ 10, 10, -10])
11631164
"""
1164-
if not isinstance(arr, (np.ndarray, ABCExtensionArray, ABCIndex, ABCSeries)):
1165+
if not isinstance(
1166+
arr,
1167+
(np.ndarray, ABCExtensionArray, ABCIndex, ABCSeries, ABCNumpyExtensionArray),
1168+
):
11651169
# GH#52981
11661170
raise TypeError(
11671171
"pd.api.extensions.take requires a numpy.ndarray, ExtensionArray, "

pandas/core/dtypes/generic.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ def _subclasscheck(cls, inst) -> bool:
145145
"periodarray",
146146
"datetimearray",
147147
"timedeltaarray",
148-
"npy_extension",
149148
},
150149
),
151150
)

0 commit comments

Comments
 (0)