diff --git a/pandas/_libs/join.pyx b/pandas/_libs/join.pyx index 164ed8a5c9227..5929647468785 100644 --- a/pandas/_libs/join.pyx +++ b/pandas/_libs/join.pyx @@ -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, @@ -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, diff --git a/pandas/core/reshape/merge.py b/pandas/core/reshape/merge.py index a904f4d9fbe13..e8fd3398c4db8 100644 --- a/pandas/core/reshape/merge.py +++ b/pandas/core/reshape/merge.py @@ -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,