Skip to content

Commit da237dd

Browse files
authored
PERF: isin casting integers to object (#38346)
1 parent 6a1305e commit da237dd

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/core/algorithms.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,7 @@ def isin(comps: AnyArrayLike, values: AnyArrayLike) -> np.ndarray:
440440
if not isinstance(
441441
values, (ABCIndexClass, ABCSeries, ABCExtensionArray, np.ndarray)
442442
):
443-
values = construct_1d_object_array_from_listlike(list(values))
444-
# TODO: could use ensure_arraylike here
443+
values = _ensure_arraylike(list(values))
445444
elif isinstance(values, ABCMultiIndex):
446445
# Avoid raising in extract_array
447446
values = np.array(values)

0 commit comments

Comments
 (0)