Skip to content

Commit 3152733

Browse files
authored
CLN: remove unused algos_common_helper functions (#44207)
1 parent c952eb2 commit 3152733

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed

pandas/_libs/algos_common_helper.pxi.in

+9-9
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,19 @@ def ensure_object(object arr):
3636

3737
# name, c_type, dtype
3838
dtypes = [('float64', 'FLOAT64', 'float64'),
39-
('float32', 'FLOAT32', 'float32'),
39+
# ('float32', 'FLOAT32', 'float32'), # disabling bc unused
4040
('int8', 'INT8', 'int8'),
4141
('int16', 'INT16', 'int16'),
4242
('int32', 'INT32', 'int32'),
4343
('int64', 'INT64', 'int64'),
44-
('uint8', 'UINT8', 'uint8'),
45-
('uint16', 'UINT16', 'uint16'),
46-
('uint32', 'UINT32', 'uint32'),
47-
('uint64', 'UINT64', 'uint64'),
48-
('complex64', 'COMPLEX64', 'complex64'),
49-
('complex128', 'COMPLEX128', 'complex128')
50-
# ('platform_int', 'INT', 'int_'),
51-
# ('object', 'OBJECT', 'object_'),
44+
# Disabling uint and complex dtypes because we do not use them
45+
# (and compiling them increases wheel size)
46+
# ('uint8', 'UINT8', 'uint8'),
47+
# ('uint16', 'UINT16', 'uint16'),
48+
# ('uint32', 'UINT32', 'uint32'),
49+
# ('uint64', 'UINT64', 'uint64'),
50+
# ('complex64', 'COMPLEX64', 'complex64'),
51+
# ('complex128', 'COMPLEX128', 'complex128')
5252
]
5353

5454
def get_dispatch(dtypes):

pandas/core/array_algos/take.py

+3
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,9 @@ def _get_take_nd_function_cached(
284284
if func is not None:
285285
return func
286286

287+
# We get here with string, uint, float16, and complex dtypes that could
288+
# potentially be handled in algos_take_helper.
289+
# Also a couple with (M8[ns], object) and (m8[ns], object)
287290
tup = (out_dtype.name, out_dtype.name)
288291
if ndim == 1:
289292
func = _take_1d_dict.get(tup, None)

pandas/core/dtypes/common.py

-4
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
_is_scipy_sparse = None
6666

6767
ensure_float64 = algos.ensure_float64
68-
ensure_float32 = algos.ensure_float32
6968

7069

7170
def ensure_float(arr):
@@ -92,13 +91,10 @@ def ensure_float(arr):
9291
return arr
9392

9493

95-
ensure_uint64 = algos.ensure_uint64
9694
ensure_int64 = algos.ensure_int64
9795
ensure_int32 = algos.ensure_int32
9896
ensure_int16 = algos.ensure_int16
9997
ensure_int8 = algos.ensure_int8
100-
ensure_complex64 = algos.ensure_complex64
101-
ensure_complex128 = algos.ensure_complex128
10298
ensure_platform_int = algos.ensure_platform_int
10399
ensure_object = algos.ensure_object
104100

0 commit comments

Comments
 (0)