diff --git a/pandas/src/algos_common_helper.pxi.in b/pandas/src/algos_common_helper.pxi.in index a579a5020f6e7..5e87528943005 100644 --- a/pandas/src/algos_common_helper.pxi.in +++ b/pandas/src/algos_common_helper.pxi.in @@ -374,7 +374,7 @@ def is_monotonic_{{name}}(ndarray[{{c_type}}] arr, bint timelike): n = len(arr) if n == 1: - if arr[0] != arr[0] or (timelike and arr[0] == iNaT): + if arr[0] != arr[0] or (timelike and arr[0] == iNaT): # single value is NaN return False, False, True else: @@ -382,14 +382,14 @@ def is_monotonic_{{name}}(ndarray[{{c_type}}] arr, bint timelike): elif n < 2: return True, True, True - if timelike and arr[0] == iNaT: + if timelike and arr[0] == iNaT: return False, False, True {{nogil_str}} {{tab}}prev = arr[0] {{tab}}for i in range(1, n): {{tab}} cur = arr[i] - {{tab}} if timelike and cur == iNaT: + {{tab}} if timelike and cur == iNaT: {{tab}} is_monotonic_inc = 0 {{tab}} is_monotonic_dec = 0 {{tab}} break diff --git a/pandas/src/algos_groupby_helper.pxi.in b/pandas/src/algos_groupby_helper.pxi.in index 70862e198edba..4b031afed3d43 100644 --- a/pandas/src/algos_groupby_helper.pxi.in +++ b/pandas/src/algos_groupby_helper.pxi.in @@ -580,7 +580,7 @@ def group_cummin_{{name}}(ndarray[{{dest_type2}}, ndim=2] out, """ cdef: Py_ssize_t i, j, N, K, size - {{dest_type2}} val, min_val + {{dest_type2}} val, min_val = 0 int64_t lab N, K = ( values).shape @@ -615,7 +615,7 @@ def group_cummax_{{name}}(ndarray[{{dest_type2}}, ndim=2] out, """ cdef: Py_ssize_t i, j, N, K, size - {{dest_type2}} val, max_val + {{dest_type2}} val, max_val = 0 int64_t lab N, K = ( values).shape diff --git a/pandas/src/joins_func_helper.pxi.in b/pandas/src/joins_func_helper.pxi.in index 486c65368602b..9cca9bba2a197 100644 --- a/pandas/src/joins_func_helper.pxi.in +++ b/pandas/src/joins_func_helper.pxi.in @@ -41,8 +41,8 @@ def asof_join_backward_{{on_dtype}}_by_{{by_dtype}}( Py_ssize_t left_pos, right_pos, left_size, right_size, found_right_pos ndarray[int64_t] left_indexer, right_indexer bint has_tolerance = 0 - {{on_dtype}} tolerance_ - {{on_dtype}} diff + {{on_dtype}} tolerance_ = 0 + {{on_dtype}} diff = 0 {{table_type}} hash_table {{by_dtype}} by_value @@ -106,8 +106,8 @@ def asof_join_forward_{{on_dtype}}_by_{{by_dtype}}( Py_ssize_t left_pos, right_pos, left_size, right_size, found_right_pos ndarray[int64_t] left_indexer, right_indexer bint has_tolerance = 0 - {{on_dtype}} tolerance_ - {{on_dtype}} diff + {{on_dtype}} tolerance_ = 0 + {{on_dtype}} diff = 0 {{table_type}} hash_table {{by_dtype}} by_value @@ -236,8 +236,8 @@ def asof_join_backward_{{on_dtype}}( Py_ssize_t left_pos, right_pos, left_size, right_size ndarray[int64_t] left_indexer, right_indexer bint has_tolerance = 0 - {{on_dtype}} tolerance_ - {{on_dtype}} diff + {{on_dtype}} tolerance_ = 0 + {{on_dtype}} diff = 0 # if we are using tolerance, set our objects if tolerance is not None: @@ -290,8 +290,8 @@ def asof_join_forward_{{on_dtype}}( Py_ssize_t left_pos, right_pos, left_size, right_size ndarray[int64_t] left_indexer, right_indexer bint has_tolerance = 0 - {{on_dtype}} tolerance_ - {{on_dtype}} diff + {{on_dtype}} tolerance_ = 0 + {{on_dtype}} diff = 0 # if we are using tolerance, set our objects if tolerance is not None: @@ -371,4 +371,3 @@ def asof_join_nearest_{{on_dtype}}( return left_indexer, right_indexer {{endfor}} -