Skip to content

Commit 3e32db5

Browse files
committed
Use algos.is_monotonic instead of Index instant
1 parent 5913382 commit 3e32db5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/indexes/interval.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import numpy as np
66

77
from pandas._libs import Timedelta, Timestamp
8+
from pandas._libs.algos import is_monotonic
89
from pandas._libs.interval import Interval, IntervalMixin, IntervalTree
910
from pandas.compat import add_metaclass
1011
from pandas.util._decorators import Appender, cache_readonly
@@ -451,7 +452,7 @@ def is_monotonic_increasing(self):
451452
values = [self.right, self.left]
452453

453454
sort_order = np.lexsort(values)
454-
return Index(sort_order).is_monotonic
455+
return is_monotonic(sort_order, False)[0]
455456

456457
@cache_readonly
457458
def is_monotonic_decreasing(self):

0 commit comments

Comments
 (0)