Skip to content

Commit 0bba602

Browse files
committed
Use algos.is_monotonic instead of Index instant
1 parent 543b0d3 commit 0bba602

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pandas/core/indexes/interval.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from pandas._config import get_option
88

99
from pandas._libs import Timedelta, Timestamp
10+
from pandas._libs.algos import is_monotonic
1011
from pandas._libs.interval import Interval, IntervalMixin, IntervalTree
1112
from pandas.compat import add_metaclass
1213
from pandas.util._decorators import Appender, cache_readonly
@@ -452,7 +453,7 @@ def is_monotonic_increasing(self):
452453
values = [self.right, self.left]
453454

454455
sort_order = np.lexsort(values)
455-
return Index(sort_order).is_monotonic
456+
return is_monotonic(sort_order, False)[0]
456457

457458
@cache_readonly
458459
def is_monotonic_decreasing(self):

0 commit comments

Comments
 (0)