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

Method setup

asv_bench/benchmarks/groupby.py:154–167  ·  view source on GitHub ↗
(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

152
153class ResampleCFTime(Resample):
154 def setup(self, *args, **kwargs):
155 self.ds1d = xr.Dataset(
156 {
157 "b": ("time", np.arange(365.0 * 24)),
158 },
159 coords={
160 "time": xr.date_range(
161 "2001-01-01", freq="h", periods=365 * 24, calendar="noleap"
162 )
163 },
164 )
165 self.ds2d = self.ds1d.expand_dims(z=10)
166 self.ds1d_mean = self.ds1d.resample(time="48h").mean()
167 self.ds2d_mean = self.ds2d.resample(time="48h").mean()
168
169
170@parameterized(["use_cftime", "use_flox"], [[True, False], [True, False]])

Callers

nothing calls this directly

Calls 4

arangeMethod · 0.80
expand_dimsMethod · 0.45
meanMethod · 0.45
resampleMethod · 0.45

Tested by

no test coverage detected