Skip to content

Commit 3826ebf

Browse files
committed
Add benchmark test
1 parent 60b8a69 commit 3826ebf

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

asv_bench/benchmarks/index_object.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import numpy as np
22
import pandas.util.testing as tm
33
from pandas import (Series, date_range, DatetimeIndex, Index, RangeIndex,
4-
Float64Index)
4+
Float64Index, IntervalIndex)
55

66

77
class SetOperations(object):
@@ -181,4 +181,15 @@ def time_get_loc(self):
181181
self.ind.get_loc(0)
182182

183183

184+
class IntervalIndexMethod(object):
185+
# GH 24813
186+
def setup(self):
187+
N = 10000
188+
left = np.append(np.arange(N), np.array(0))
189+
right = np.append(np.arange(1, N + 1), np.array(1))
190+
self.intv = IntervalIndex.from_arrays(left, right)
191+
192+
def time_monotonic_inc(self):
193+
self.intv.is_monotonic_increasing
194+
184195
from .pandas_vb_common import setup # noqa: F401

0 commit comments

Comments
 (0)