Skip to content

Commit 1c1a668

Browse files
committed
use .any() instead of any() + whatsnew entry
1 parent 18f0e22 commit 1c1a668

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/source/whatsnew/v1.1.3.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Fixed regressions
2222

2323
Bug fixes
2424
~~~~~~~~~
25-
-
25+
- Bug in :meth:`isin()` when using NaN and a row length above 1,000,000 (:issue:`22205`)
2626

2727
.. ---------------------------------------------------------------------------
2828

pandas/core/algorithms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def isin(comps: AnyArrayLike, values: AnyArrayLike) -> np.ndarray:
442442
if len(comps) > 1_000_000 and not is_object_dtype(comps):
443443
# If the the values include nan we need to check for nan explicitly
444444
# since np.nan it not equal to np.nan
445-
if any(np.isnan(values)):
445+
if np.isnan(values).any():
446446
f = lambda c, v: np.logical_or(np.in1d(c, v), np.isnan(c))
447447
else:
448448
f = np.in1d

0 commit comments

Comments
 (0)