File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Expand file tree Collapse file tree 1 file changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -433,19 +433,9 @@ def isin(comps: AnyArrayLike, values: AnyArrayLike) -> np.ndarray:
433433 comps , dtype = _ensure_data (comps )
434434 values , _ = _ensure_data (values , dtype = dtype )
435435
436- # faster for larger cases to use np.in1d
437436 f = htable .ismember_object
438437
439- # GH16012
440- # Ensure np.in1d doesn't get object types or it *may* throw an exception
441- if len (comps ) > 1_000_000 and not is_object_dtype (comps ):
442- # If the the values include nan we need to check for nan explicitly
443- # since np.nan it not equal to np.nan
444- if isna (values ).any ():
445- f = lambda c , v : np .logical_or (np .in1d (c , v ), np .isnan (c ))
446- else :
447- f = np .in1d
448- elif is_integer_dtype (comps ):
438+ if is_integer_dtype (comps ):
449439 try :
450440 values = values .astype ("int64" , copy = False )
451441 comps = comps .astype ("int64" , copy = False )
You can’t perform that action at this time.
0 commit comments