| 32 | param_names = ["dtype", "index_structure"] |
| 33 | |
| 34 | def setup(self, dtype, index_structure): |
| 35 | N = 10**6 |
| 36 | indices = { |
| 37 | "unique_monotonic_inc": Index(range(N), dtype=dtype), |
| 38 | "nonunique_monotonic_inc": Index( |
| 39 | [*list(range(55)), 54, *list(range(55, N - 1))], dtype=dtype |
| 40 | ), |
| 41 | } |
| 42 | self.data = Series(np.random.rand(N), index=indices[index_structure]) |
| 43 | self.array = np.arange(10000) |
| 44 | self.array_list = self.array.tolist() |
| 45 | |
| 46 | def time_getitem_scalar(self, index, index_structure): |
| 47 | self.data[800000] |