From fcf282a6bd1b67f1df2e322d557c612e78ae0d93 Mon Sep 17 00:00:00 2001 From: Deepak Cherian Date: Wed, 11 Oct 2023 15:52:17 -0600 Subject: [PATCH] small cleanups --- asv_bench/benchmarks/reduce.py | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/asv_bench/benchmarks/reduce.py b/asv_bench/benchmarks/reduce.py index 19172ea9e..326b73566 100644 --- a/asv_bench/benchmarks/reduce.py +++ b/asv_bench/benchmarks/reduce.py @@ -10,7 +10,6 @@ engines = ["flox", "numpy", "numbagg"] expected_groups = { "None": None, - # "RangeIndex": pd.RangeIndex(5), "bins": pd.IntervalIndex.from_breaks([1, 2, 4]), } expected_names = tuple(expected_groups) @@ -95,14 +94,6 @@ def time_reduce_bare(self, func, engine): ) -# class ChunkReduce1DUnsorted(ChunkReduce): -# def setup(self, *args, **kwargs): -# self.array = np.ones((N,)) -# self.labels = np.random.permutation(np.repeat(np.arange(5), repeats=N // 5)) -# self.axis = -1 -# setup_jit() - - class ChunkReduce2D(ChunkReduce): def setup(self, *args, **kwargs): self.array = np.ones((N, N)) @@ -111,6 +102,14 @@ def setup(self, *args, **kwargs): setup_jit() +class ChunkReduce2DAllAxes(ChunkReduce): + def setup(self, *args, **kwargs): + self.array = np.ones((N, N)) + self.labels = np.repeat(np.arange(N // 5), repeats=5) + self.axis = None + setup_jit() + + # class ChunkReduce2DUnsorted(ChunkReduce): # def setup(self, *args, **kwargs): # self.array = np.ones((N, N)) @@ -118,13 +117,12 @@ def setup(self, *args, **kwargs): # self.axis = -1 # setup_jit() - -class ChunkReduce2DAllAxes(ChunkReduce): - def setup(self, *args, **kwargs): - self.array = np.ones((N, N)) - self.labels = np.repeat(np.arange(N // 5), repeats=5) - self.axis = None - setup_jit() +# class ChunkReduce1DUnsorted(ChunkReduce): +# def setup(self, *args, **kwargs): +# self.array = np.ones((N,)) +# self.labels = np.random.permutation(np.repeat(np.arange(5), repeats=N // 5)) +# self.axis = -1 +# setup_jit() # class ChunkReduce2DAllAxesUnsorted(ChunkReduce):