Skip to content

Commit e7b4930

Browse files
authored
[skip-ci] Fix groupby binary ops benchmarks (#7603)
* [skip-ci] Fix groupby binary ops benchmarks * [skip-ci] fix * [skip-ci] xfail resample binary ops * [skip-ci] add skipping message * [skip-ci] remove resample binary ops
1 parent b36819b commit e7b4930

File tree

1 file changed

+12
-24
lines changed

1 file changed

+12
-24
lines changed

asv_bench/benchmarks/groupby.py

+12-24
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ def time_agg_large_num_groups(self, method, ndim):
3434
ds = getattr(self, f"ds{ndim}d")
3535
getattr(ds.groupby("b"), method)()
3636

37-
def time_groupby_binary_op_1d(self):
38-
self.ds1d - self.ds1d_mean
37+
def time_binary_op_1d(self):
38+
self.ds1d.groupby("b") - self.ds1d_mean
3939

40-
def time_groupby_binary_op_2d(self):
41-
self.ds2d - self.ds2d_mean
40+
def time_binary_op_2d(self):
41+
self.ds2d.groupby("b") - self.ds2d_mean
4242

43-
def peakmem_groupby_binary_op_1d(self):
44-
self.ds1d - self.ds1d_mean
43+
def peakmem_binary_op_1d(self):
44+
self.ds1d.groupby("b") - self.ds1d_mean
4545

46-
def peakmem_groupby_binary_op_2d(self):
47-
self.ds2d - self.ds2d_mean
46+
def peakmem_binary_op_2d(self):
47+
self.ds2d.groupby("b") - self.ds2d_mean
4848

4949

5050
class GroupByDask(GroupBy):
@@ -71,10 +71,10 @@ def setup(self, *args, **kwargs):
7171
self.ds1d = self.ds1d.to_dataframe()
7272
self.ds1d_mean = self.ds1d.groupby("b").mean()
7373

74-
def time_groupby_binary_op_2d(self):
74+
def time_binary_op_2d(self):
7575
raise NotImplementedError
7676

77-
def peakmem_groupby_binary_op_2d(self):
77+
def peakmem_binary_op_2d(self):
7878
raise NotImplementedError
7979

8080

@@ -90,10 +90,10 @@ def setup(self, *args, **kwargs):
9090
self.ds1d = self.ds1d.chunk({"dim_0": 50}).to_dataframe()
9191
self.ds1d_mean = self.ds1d.groupby("b").mean()
9292

93-
def time_groupby_binary_op_2d(self):
93+
def time_binary_op_2d(self):
9494
raise NotImplementedError
9595

96-
def peakmem_groupby_binary_op_2d(self):
96+
def peakmem_binary_op_2d(self):
9797
raise NotImplementedError
9898

9999

@@ -123,18 +123,6 @@ def time_agg_large_num_groups(self, method, ndim):
123123
ds = getattr(self, f"ds{ndim}d")
124124
getattr(ds.resample(time="48H"), method)()
125125

126-
def time_groupby_binary_op_1d(self):
127-
self.ds1d - self.ds1d_mean
128-
129-
def time_groupby_binary_op_2d(self):
130-
self.ds2d - self.ds2d_mean
131-
132-
def peakmem_groupby_binary_op_1d(self):
133-
self.ds1d - self.ds1d_mean
134-
135-
def peakmem_groupby_binary_op_2d(self):
136-
self.ds2d - self.ds2d_mean
137-
138126

139127
class ResampleDask(Resample):
140128
def setup(self, *args, **kwargs):

0 commit comments

Comments
 (0)