@@ -33,8 +33,7 @@ def inner_join(const intp_t[:] left, const intp_t[:] right,
3333 Py_ssize_t max_groups ):
3434 cdef:
3535 Py_ssize_t i, j, k, count = 0
36- ndarray[intp_t] left_sorter, right_sorter
37- ndarray[int64_t] left_count, right_count
36+ ndarray[int64_t] left_count, right_count, left_sorter, right_sorter
3837 ndarray[int64_t] left_indexer, right_indexer
3938 int64_t lc, rc
4039 Py_ssize_t loc, left_pos = 0 , right_pos = 0 , position = 0
@@ -85,8 +84,8 @@ def left_outer_join(const intp_t[:] left, const intp_t[:] right,
8584 Py_ssize_t max_groups , bint sort = True ):
8685 cdef:
8786 Py_ssize_t i, j, k, count = 0
88- ndarray[int64_t] left_count, right_count
89- ndarray[intp_t] rev, left_sorter, right_sorter
87+ ndarray[int64_t] left_count, right_count, left_sorter, right_sorter
88+ ndarray rev
9089 ndarray[int64_t] left_indexer, right_indexer
9190 int64_t lc, rc
9291 Py_ssize_t loc, left_pos = 0 , right_pos = 0 , position = 0
@@ -158,8 +157,7 @@ def full_outer_join(const intp_t[:] left, const intp_t[:] right,
158157 Py_ssize_t max_groups ):
159158 cdef:
160159 Py_ssize_t i, j, k, count = 0
161- ndarray[intp_t] left_sorter, right_sorter
162- ndarray[int64_t] left_count, right_count
160+ ndarray[int64_t] left_count, right_count, left_sorter, right_sorter
163161 ndarray[int64_t] left_indexer, right_indexer
164162 int64_t lc, rc
165163 int64_t left_pos = 0 , right_pos = 0
@@ -217,16 +215,12 @@ def full_outer_join(const intp_t[:] left, const intp_t[:] right,
217215 _get_result_indexer(right_sorter, right_indexer))
218216
219217
220- cdef ndarray[int64_t] _get_result_indexer(
221- ndarray[intp_t] sorter, ndarray[int64_t] indexer
222- ):
218+ cdef _get_result_indexer(ndarray[int64_t] sorter, ndarray[int64_t] indexer):
223219 if len (sorter) > 0 :
224220 # cython-only equivalent to
225221 # `res = algos.take_nd(sorter, indexer, fill_value=-1)`
226222 res = np.empty(len (indexer), dtype = np.int64)
227- take_1d_int64_int64(ensure_int64(sorter), ensure_platform_int(indexer), res, - 1 )
228- # FIXME: sorter is intp_t, not int64_t, opposite for indexer;
229- # will this break on 32bit builds?
223+ take_1d_int64_int64(sorter, indexer, res, - 1 )
230224 else :
231225 # length-0 case
232226 res = np.empty(len (indexer), dtype = np.int64)
0 commit comments