diff --git a/pandas/_libs/algos_common_helper.pxi.in b/pandas/_libs/algos_common_helper.pxi.in index 4242a76dcc3b7..c6338216eb7a2 100644 --- a/pandas/_libs/algos_common_helper.pxi.in +++ b/pandas/_libs/algos_common_helper.pxi.in @@ -36,19 +36,19 @@ def ensure_object(object arr): # name, c_type, dtype dtypes = [('float64', 'FLOAT64', 'float64'), - ('float32', 'FLOAT32', 'float32'), + # ('float32', 'FLOAT32', 'float32'), # disabling bc unused ('int8', 'INT8', 'int8'), ('int16', 'INT16', 'int16'), ('int32', 'INT32', 'int32'), ('int64', 'INT64', 'int64'), - ('uint8', 'UINT8', 'uint8'), - ('uint16', 'UINT16', 'uint16'), - ('uint32', 'UINT32', 'uint32'), - ('uint64', 'UINT64', 'uint64'), - ('complex64', 'COMPLEX64', 'complex64'), - ('complex128', 'COMPLEX128', 'complex128') - # ('platform_int', 'INT', 'int_'), - # ('object', 'OBJECT', 'object_'), + # Disabling uint and complex dtypes because we do not use them + # (and compiling them increases wheel size) + # ('uint8', 'UINT8', 'uint8'), + # ('uint16', 'UINT16', 'uint16'), + # ('uint32', 'UINT32', 'uint32'), + # ('uint64', 'UINT64', 'uint64'), + # ('complex64', 'COMPLEX64', 'complex64'), + # ('complex128', 'COMPLEX128', 'complex128') ] def get_dispatch(dtypes): diff --git a/pandas/core/array_algos/take.py b/pandas/core/array_algos/take.py index e1a29f0dbe395..87d55702b33e0 100644 --- a/pandas/core/array_algos/take.py +++ b/pandas/core/array_algos/take.py @@ -284,6 +284,9 @@ def _get_take_nd_function_cached( if func is not None: return func + # We get here with string, uint, float16, and complex dtypes that could + # potentially be handled in algos_take_helper. + # Also a couple with (M8[ns], object) and (m8[ns], object) tup = (out_dtype.name, out_dtype.name) if ndim == 1: func = _take_1d_dict.get(tup, None) diff --git a/pandas/core/dtypes/common.py b/pandas/core/dtypes/common.py index 2e8641c281661..0788ecdd8b4b5 100644 --- a/pandas/core/dtypes/common.py +++ b/pandas/core/dtypes/common.py @@ -65,7 +65,6 @@ _is_scipy_sparse = None ensure_float64 = algos.ensure_float64 -ensure_float32 = algos.ensure_float32 def ensure_float(arr): @@ -92,13 +91,10 @@ def ensure_float(arr): return arr -ensure_uint64 = algos.ensure_uint64 ensure_int64 = algos.ensure_int64 ensure_int32 = algos.ensure_int32 ensure_int16 = algos.ensure_int16 ensure_int8 = algos.ensure_int8 -ensure_complex64 = algos.ensure_complex64 -ensure_complex128 = algos.ensure_complex128 ensure_platform_int = algos.ensure_platform_int ensure_object = algos.ensure_object