Skip to content

Commit 0b47d85

Browse files
authored
CI/BENCH: Make CategoricalIndexIndexing benchmark less flaky (#49870)
1 parent 3c72d6f commit 0b47d85

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

asv_bench/benchmarks/indexing.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
lower-level methods directly on Index and subclasses, see index_object.py,
44
indexing_engine.py, and index_cached.py
55
"""
6-
import itertools
7-
import string
86
import warnings
97

108
import numpy as np
@@ -353,15 +351,13 @@ def setup(self, index):
353351
"non_monotonic": CategoricalIndex(list("abc" * N)),
354352
}
355353
self.data = indices[index]
356-
self.data_unique = CategoricalIndex(
357-
["".join(perm) for perm in itertools.permutations(string.printable, 3)]
358-
)
354+
self.data_unique = CategoricalIndex([str(i) for i in range(N * 3)])
359355

360356
self.int_scalar = 10000
361357
self.int_list = list(range(10000))
362358

363359
self.cat_scalar = "b"
364-
self.cat_list = ["a", "c"]
360+
self.cat_list = ["1", "3"]
365361

366362
def time_getitem_scalar(self, index):
367363
self.data[self.int_scalar]

0 commit comments

Comments
 (0)