Skip to content

Commit 5438656

Browse files
committed
DEPR: Remove deprecation from private class IntervalTree
1 parent b4ec020 commit 5438656

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

pandas/_libs/intervaltree.pxi.in

+3-12
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import warnings
88
from pandas._libs import lib
99
from pandas._libs.algos import is_monotonic
1010

11-
from pandas._libs.interval import _warning_interval
12-
1311
ctypedef fused int_scalar_t:
1412
int64_t
1513
float64_t
@@ -42,18 +40,13 @@ cdef class IntervalTree(IntervalMixin):
4240
object _is_overlapping, _left_sorter, _right_sorter
4341
Py_ssize_t _na_count
4442

45-
def __init__(self, left, right, inclusive: str | None = None, closed: None | lib.NoDefault = lib.no_default, leaf_size=100):
43+
def __init__(self, left, right, inclusive: str | None = None, leaf_size=100):
4644
"""
4745
Parameters
4846
----------
4947
left, right : np.ndarray[ndim=1]
5048
Left and right bounds for each interval. Assumed to contain no
5149
NaNs.
52-
closed : {'left', 'right', 'both', 'neither'}, optional
53-
Whether the intervals are closed on the left-side, right-side, both
54-
or neither. Defaults to 'right'.
55-
56-
.. deprecated:: 1.5.0
5750

5851
inclusive : {"both", "neither", "left", "right"}, optional
5952
Whether the intervals are closed on the left-side, right-side, both
@@ -66,8 +59,6 @@ cdef class IntervalTree(IntervalMixin):
6659
to brute-force search. Tune this parameter to optimize query
6760
performance.
6861
"""
69-
inclusive, closed = _warning_interval(inclusive, closed)
70-
7162
if inclusive is None:
7263
inclusive = "right"
7364

@@ -119,7 +110,7 @@ cdef class IntervalTree(IntervalMixin):
119110
if self._is_overlapping is not None:
120111
return self._is_overlapping
121112

122-
# <= when both sides closed since endpoints can overlap
113+
# <= when inclusive on both sides since endpoints can overlap
123114
op = le if self.inclusive == 'both' else lt
124115

125116
# overlap if start of current interval < end of previous interval
@@ -263,7 +254,7 @@ cdef class IntervalNode:
263254

264255

265256
# we need specialized nodes and leaves to optimize for different dtype and
266-
# closed values
257+
# inclusive values
267258

268259
{{py:
269260

0 commit comments

Comments
 (0)