File tree Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Expand file tree Collapse file tree 1 file changed +1
-12
lines changed Original file line number Diff line number Diff line change @@ -433,19 +433,8 @@ 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
438-
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 np .isnan (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 ):
437+ if is_integer_dtype (comps ):
449438 try :
450439 values = values .astype ("int64" , copy = False )
451440 comps = comps .astype ("int64" , copy = False )
You can’t perform that action at this time.
0 commit comments