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

Method setup

asv_bench/benchmarks/rolling.py:92–105  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

90
91class RollingMemory:
92 def setup(self, *args, **kwargs):
93 self.ds = xr.Dataset(
94 {
95 "var1": (("x", "y"), randn_xy),
96 "var2": (("x", "t"), randn_xt),
97 "var3": (("t",), randn_t),
98 },
99 coords={
100 "x": np.arange(nx),
101 "y": np.linspace(0, 1, ny),
102 "t": pd.date_range("1970-01-01", periods=nt, freq="D"),
103 "x_coords": ("x", np.linspace(1.1, 2.1, nx)),
104 },
105 )
106
107
108class DataArrayRollingMemory(RollingMemory):

Callers

nothing calls this directly

Calls 2

arangeMethod · 0.80
linspaceMethod · 0.80

Tested by

no test coverage detected