@@ -229,34 +229,3 @@ def test_min_max(self, left_right_dtypes, index_or_series_or_array):
229
229
res = arr_na .max (** kws )
230
230
assert res == MAX
231
231
assert type (res ) == type (MAX )
232
-
233
- def test_intervalarray_overlaps_all_cases (self ):
234
- # Basic self-overlap
235
- data = [(0 , 1 ), (1 , 3 ), (2 , 4 )]
236
- arr = IntervalArray .from_tuples (data )
237
- result = arr .overlaps (arr )
238
- expected = np .array ([True , True , True ])
239
- tm .testing .assert_array_equal (result , expected )
240
-
241
- # Overlap with different intervals
242
- arr2 = IntervalArray .from_tuples ([(0.5 , 1.5 ), (2 , 2.5 ), (3 , 5 )])
243
- result2 = arr .overlaps (arr2 )
244
- expected2 = np .array ([True , False , True ])
245
- tm .testing .assert_array_equal (result2 , expected2 )
246
-
247
- # Length mismatch
248
- arr_short = IntervalArray .from_tuples ([(0 , 1 )])
249
- with pytest .raises (ValueError , match = "same length" ):
250
- arr .overlaps (arr_short )
251
-
252
- # Closed property mismatch
253
- arr_left = IntervalArray .from_tuples (data , closed = "left" )
254
- arr_right = IntervalArray .from_tuples (data , closed = "right" )
255
- with pytest .raises (ValueError , match = "same 'closed' property" ):
256
- arr_left .overlaps (arr_right )
257
-
258
- # Overlap with scalar interval
259
- interval = Interval (1 , 2 )
260
- result3 = arr .overlaps (interval )
261
- expected3 = np .array ([False , True , False ])
262
- tm .testing .assert_array_equal (result3 , expected3 )
0 commit comments