Skip to content

Commit dd37f9c

Browse files
committed
Revert "Using existing type check functions"
This reverts commit 9fca52c.
1 parent 9fca52c commit dd37f9c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pandas/core/algorithms.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
from pandas.core.dtypes.common import (
1717
is_array_like,
1818
is_unsigned_integer_dtype, is_signed_integer_dtype,
19-
is_integer, is_integer_dtype, is_complex_dtype,
19+
is_integer_dtype, is_complex_dtype,
2020
is_object_dtype,
2121
is_extension_array_dtype,
2222
is_categorical_dtype, is_sparse,
2323
is_period_dtype,
24-
is_numeric_dtype, is_float, is_float_dtype,
24+
is_numeric_dtype, is_float_dtype,
2525
is_bool_dtype, needs_i8_conversion,
2626
is_datetimetz, is_datetime_or_timedelta_dtype,
2727
is_datetime64_any_dtype, is_datetime64tz_dtype,
@@ -432,13 +432,16 @@ def isin(comps, values):
432432
comps_types = set(type(v) for v in comps)
433433
values_types = set(type(v) for v in values)
434434

435+
is_int = lambda x: ((x == np.int64) or (x == int))
436+
is_float = lambda x: ((x == np.float64) or (x == float))
437+
435438
int_flg = False
436439
float_flg = False
437440

438441
if len(comps_types) == len(values_types) == 1:
439442
comps_types = comps_types.pop()
440443
values_types = values_types.pop()
441-
int_flg = (is_integer(comps_types) and is_integer(values_types))
444+
int_flg = (is_int(comps_types) and is_int(values_types))
442445
float_flg = (is_float(comps_types) and is_float(values_types))
443446

444447
# GH16012

0 commit comments

Comments
 (0)