Skip to content

COMPAT: Remove unnecessary memoryview workaround #52237

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 4 commits into from
Jul 18, 2023
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
14 changes: 2 additions & 12 deletions pandas/_libs/join.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -850,17 +850,7 @@ def asof_join_nearest_on_X_by_Y(ndarray[numeric_t] left_values,
numeric_t bdiff, fdiff

# search both forward and backward
# TODO(cython3):
# Bug in beta1 preventing Cython from choosing
# right specialization when one fused memview is None
# Doesn't matter what type we choose
# (nothing happens anyways since it is None)
# GH 51640
if left_by_values is not None and left_by_values.dtype != object:
by_dtype = f"{left_by_values.dtype}_t"
else:
by_dtype = object
bli, bri = asof_join_backward_on_X_by_Y[f"{left_values.dtype}_t", by_dtype](
bli, bri = asof_join_backward_on_X_by_Y(
left_values,
right_values,
left_by_values,
Expand All @@ -869,7 +859,7 @@ def asof_join_nearest_on_X_by_Y(ndarray[numeric_t] left_values,
tolerance,
use_hashtable
)
fli, fri = asof_join_forward_on_X_by_Y[f"{left_values.dtype}_t", by_dtype](
fli, fri = asof_join_forward_on_X_by_Y(
left_values,
right_values,
left_by_values,
Expand Down
8 changes: 1 addition & 7 deletions pandas/core/reshape/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -2207,13 +2207,7 @@ def injection(obj: ArrayLike):
else:
# choose appropriate function by type
func = _asof_by_function(self.direction)
# TODO(cython3):
# Bug in beta1 preventing Cython from choosing
# right specialization when one fused memview is None
# Doesn't matter what type we choose
# (nothing happens anyways since it is None)
# GH 51640
return func[f"{left_values.dtype}_t", object](
return func(
left_values,
right_values,
None,
Expand Down