Skip to content

Commit

Permalink
adding more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
realead committed Nov 14, 2020
1 parent 1a85bb8 commit 7387b6d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions asv_bench/benchmarks/series_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class IsInLongSeries:
params = [
["int64", "int32", "float64", "float32", "object"],
[1, 2, 5, 10, 50, 100, 1000, 10 ** 5],
["random_hits", "random_misses", "monotone"],
["random_hits", "random_misses", "monotone_hits", "monotone_misses"],
]
param_names = ["dtype", "MaxNumber", "series_type"]

Expand All @@ -106,8 +106,10 @@ def setup(self, dtype, MaxNumber, series_type):
if series_type == "random_misses":
np.random.seed(42)
array = np.random.randint(0, MaxNumber, N) + MaxNumber
if series_type == "monotone":
if series_type == "monotone_hits":
array = np.repeat(np.arange(MaxNumber), N // MaxNumber)
if series_type == "monotone_misses":
array = np.arange(N) + MaxNumber
self.series = Series(array).astype(dtype)
self.values = np.arange(MaxNumber).astype(dtype)

Expand Down

0 comments on commit 7387b6d

Please sign in to comment.