Skip to content

CLN: remove unused algos_common_helper functions #44207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions pandas/_libs/algos_common_helper.pxi.in
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
3 changes: 3 additions & 0 deletions pandas/core/array_algos/take.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 0 additions & 4 deletions pandas/core/dtypes/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
_is_scipy_sparse = None

ensure_float64 = algos.ensure_float64
ensure_float32 = algos.ensure_float32


def ensure_float(arr):
Expand All @@ -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

Expand Down