def time_key2_opsum_const12_baseline(self) -> None: self.df_baseline.groupby(dim_col(2))[const_col([1, 2])].sum()
def time_add_const12_baseline(self): self.df_baseline[const_col([1, 2])] + self.df_baseline[const_col([1, 2])]
def test_const_value_counts(self, df: pd.DataFrame, dims: List[int]) -> None: assert (df[const_col(dims)].value_counts() == SIZE**(N_DIMS - len(dims))).all()
def time_sum_const012_baseline(self): self.df_baseline[const_col([0, 1, 2])].sum()
def time_shift_int_const12_rle(self): self.df_rle[const_col([1, 2])].shift(periods=1, fill_value=1)
def time_take_unstable_const12_base(self): self.df_baseline[const_col([1, 2])].take(self.shuffle_dim2_unstable)
def time_groupby2_sum_const12_baseline(self): self.df_baseline.groupby(dim_col(2))[const_col([1, 2])].sum()
def time_const12_base(self) -> None: self.df_baseline[const_col([1, 2])].unique()
def time_const12_rle(self) -> None: self.df_rle[const_col([1, 2])].unique()
def time_int_const12_base(self) -> None: self.df_baseline[const_col([1, 2])].shift(periods=1, fill_value=1)
def time_float_const12_base(self) -> None: self.df_baseline[const_col([1, 2])].shift(periods=1)
def time_sum_const12_rle(self) -> None: self.df_rle[const_col([1, 2])].sum()
def time_sum_const12_baseline(self) -> None: self.df_baseline[const_col([1, 2])].sum()
def test_const_col(dims: List[int], expected: str) -> None: actual = const_col(dims) assert actual == expected
def time_eq_const12_baseline(self): self.df_baseline[const_col([1, 2])] == self.df_baseline[const_col([1, 2])]
def time_const12_base(self) -> None: self.df_baseline[const_col([1, 2])].factorize()
def time_eq_const12_rle(self): self.df_rle[const_col([1, 2])] == self.df_rle[const_col([1, 2])]
def time_const12_rle(self) -> None: with self.ignore_performance_warnings(): self.df_rle[const_col([1, 2])].factorize()
def time_take_stable_const12_rle(self): self.df_rle[const_col([1, 2])].take(self.shuffle_dim2_stable)
def time_decompress_array_astype(self) -> None: with self.ignore_performance_warnings(): self.df_rle[const_col([1, 2])].array.astype(np.int64)
def time_groupby2_sum_const12_rle(self): with self.ignore_performance_warnings(): self.df_rle_wo_dims.groupby(dim_col(2))[const_col([1, 2])].sum()
def time_decompress_to_numpy(self) -> None: with self.ignore_performance_warnings(): self.df_rle[const_col([1, 2])].to_numpy()
def time_sum_const012_rle(self): self.df_rle[const_col([0, 1, 2])].sum()
def time_unstable_const12_rle(self) -> None: self.df_rle[const_col([1, 2])].take(self.shuffle_dim2_unstable)
def time_shift_float_const12_rle(self): self.df_rle[const_col([1, 2])].shift(periods=1)
def time_stable_const12_base(self) -> None: self.df_baseline[const_col([1, 2])].take(self.shuffle_dim2_stable)
def time_add_const12_rle(self): self.df_rle[const_col([1, 2])] + self.df_rle[const_col([1, 2])]
def test_const_nunique(self, df: pd.DataFrame, dims: List[int]) -> None: assert df[const_col(dims)].nunique() == SIZE**len(dims)