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

Method setup

asv_bench/benchmarks/rolling.py:182–186  ·  view source on GitHub ↗
(self, constructor, window, dtype, method)

Source from the content-addressed store, hash-verified

180 param_names = ["constructor", "window", "dtype", "method"]
181
182 def setup(self, constructor, window, dtype, method):
183 N = 10**5
184 arr = (100 * np.random.random(N)).astype(dtype)
185 index = pd.date_range("2017-01-01", periods=N, freq="5s")
186 self.window = getattr(pd, constructor)(arr, index=index).rolling(window)
187
188
189class Pairwise:

Callers

nothing calls this directly

Calls 2

astypeMethod · 0.45
rollingMethod · 0.45

Tested by

no test coverage detected