Skip to content

Commit 9c23aac

Browse files
committed
Add benchmark
1 parent 9c85d79 commit 9c23aac

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

asv_bench/benchmarks/index_object.py

+13-1
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,16 @@ 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 = 10**5
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_is_unique(self):
193+
self.intv.is_unique
194+
195+
184196
from .pandas_vb_common import setup # noqa: F401

0 commit comments

Comments
 (0)