Skip to content

CI: Fix asv #42732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion asv_bench/benchmarks/reshape.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def setup(self, dtype):
columns = np.arange(n)
if dtype == "int":
values = np.arange(m * m * n).reshape(m * m, n)
self.df = DataFrame(values, index, columns)
else:
# the category branch is ~20x slower than int. So we
# cut down the size a bit. Now it's only ~3x slower.
Expand All @@ -111,7 +112,10 @@ def setup(self, dtype):
values = np.take(list(string.ascii_letters), indices)
values = [pd.Categorical(v) for v in values.T]

self.df = DataFrame({i: cat for i, cat in enumerate(values)}, index, columns)
self.df = DataFrame(
{i: cat for i, cat in enumerate(values)}, index, columns
)

self.df2 = self.df.iloc[:-1]

def time_full_product(self, dtype):
Expand Down