MCPcopy
hub / github.com/pandas-dev/pandas / setup

Method setup

asv_bench/benchmarks/algos/isin.py:305–315  ·  view source on GitHub ↗
(self, dtype, series_type)

Source from the content-addressed store, hash-verified

303 param_names = ["dtype", "series_type"]
304
305 def setup(self, dtype, series_type):
306 N = 10**7
307
308 if series_type == "random":
309 vals = np.random.randint(0, 10 * N, N)
310 if series_type == "monotone":
311 vals = np.arange(N)
312
313 self.values = vals.astype(dtype.lower())
314 M = 10**6 + 1
315 self.series = Series(np.arange(M)).astype(dtype)
316
317 def time_isin(self, dtypes, series_type):
318 self.series.isin(self.values)

Callers

nothing calls this directly

Calls 3

SeriesClass · 0.90
lowerMethod · 0.80
astypeMethod · 0.45

Tested by

no test coverage detected