MCPcopy
hub / github.com/pydata/xarray / setup

Method setup

asv_bench/benchmarks/polyfit.py:12–19  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

10
11class Polyval:
12 def setup(self, *args, **kwargs):
13 self.xs = {nx: xr.DataArray(randn((nx,)), dims="x", name="x") for nx in NX}
14 self.coeffs = {
15 ndeg: xr.DataArray(
16 randn((ndeg,)), dims="degree", coords={"degree": np.arange(ndeg)}
17 )
18 for ndeg in NDEGS
19 }
20
21 @parameterized(["nx", "ndeg"], [NX, NDEGS])
22 def time_polyval(self, nx, ndeg):

Callers 1

setupMethod · 0.45

Calls 2

randnFunction · 0.85
arangeMethod · 0.80

Tested by

no test coverage detected