Skip to content

Commit 2fd957c

Browse files
maybe_promote is only for np.dtype
1 parent 92c1fe4 commit 2fd957c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/array_algos/take.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def take_nd(
9494
"""
9595
if fill_value is lib.no_default:
9696
fill_value = na_value_for_dtype(arr.dtype, compat=False)
97-
elif arr.dtype.kind in "mM":
97+
elif isinstance(arr.dtype, np.dtype) and arr.dtype.kind in "mM":
9898
dtype, fill_value = maybe_promote(arr.dtype, fill_value)
9999
if arr.dtype != dtype:
100100
# EA.take is strict about returning a new object of the same type

0 commit comments

Comments
 (0)