Skip to content

CLN: Removed unused variable #32458

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

Closed
Closed
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
4 changes: 0 additions & 4 deletions pandas/_libs/internals.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,9 @@ def get_blkno_indexers(int64_t[:] blknos, bint group=True):
cdef:
int64_t cur_blkno
Py_ssize_t i, start, stop, n, diff

object blkno
list group_order
dict group_dict
int64_t[:] res_view

n = blknos.shape[0]

Expand Down Expand Up @@ -418,12 +416,10 @@ def get_blkno_indexers(int64_t[:] blknos, bint group=True):
else:
tot_len = sum(stop - start for start, stop in slices)
result = np.empty(tot_len, dtype=np.int64)
res_view = result

i = 0
for start, stop in slices:
for diff in range(start, stop):
res_view[i] = diff
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is equivalent to setting result[i] = diff. my guess is doing it like with the memoryview is intended for perf

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, the CI is not passing which is a clear sign that this is important.

Now all that I am wondering is how to get rid of that warnings during compilation.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea the warnings here are really the big blocker for #32163 . If you find a solution that would be huge!

i += 1

yield blkno, result
Expand Down