Skip to content

Commit 2e1ce1a

Browse files
jschendeljreback
authored andcommitted
TST: IntervalTree.get_loc_interval should return platform int (#23660)
1 parent 20bdb3e commit 2e1ce1a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/_libs/intervaltree.pxi.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ cdef class IntervalTree(IntervalMixin):
116116
enclosing = self.get_loc(0.5 * (key_left + key_right))
117117
combined = np.concatenate([left_overlap, right_overlap, enclosing])
118118
uniques = pd.unique(combined)
119-
return uniques
119+
return uniques.astype('intp')
120120

121121
def get_indexer(self, scalar_t[:] target):
122122
"""Return the positions corresponding to unique intervals that overlap

0 commit comments

Comments
 (0)