@@ -8,8 +8,6 @@ import warnings
8
8
from pandas._libs import lib
9
9
from pandas._libs.algos import is_monotonic
10
10
11
- from pandas._libs.interval import _warning_interval
12
-
13
11
ctypedef fused int_scalar_t:
14
12
int64_t
15
13
float64_t
@@ -42,18 +40,13 @@ cdef class IntervalTree(IntervalMixin):
42
40
object _is_overlapping, _left_sorter, _right_sorter
43
41
Py_ssize_t _na_count
44
42
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):
46
44
"""
47
45
Parameters
48
46
----------
49
47
left, right : np.ndarray[ndim=1]
50
48
Left and right bounds for each interval. Assumed to contain no
51
49
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
57
50
58
51
inclusive : {"both", "neither", "left", "right"}, optional
59
52
Whether the intervals are closed on the left-side, right-side, both
@@ -66,8 +59,6 @@ cdef class IntervalTree(IntervalMixin):
66
59
to brute-force search. Tune this parameter to optimize query
67
60
performance.
68
61
"""
69
- inclusive, closed = _warning_interval(inclusive, closed)
70
-
71
62
if inclusive is None:
72
63
inclusive = "right"
73
64
@@ -119,7 +110,7 @@ cdef class IntervalTree(IntervalMixin):
119
110
if self._is_overlapping is not None:
120
111
return self._is_overlapping
121
112
122
- # <= when both sides closed since endpoints can overlap
113
+ # <= when inclusive on both sides since endpoints can overlap
123
114
op = le if self.inclusive == 'both' else lt
124
115
125
116
# overlap if start of current interval < end of previous interval
@@ -263,7 +254,7 @@ cdef class IntervalNode:
263
254
264
255
265
256
# we need specialized nodes and leaves to optimize for different dtype and
266
- # closed values
257
+ # inclusive values
267
258
268
259
{{py:
269
260
0 commit comments