Skip to content
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

fix: remove unneeded cast #2653

Merged
merged 3 commits into from
Aug 16, 2023
Merged

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Aug 16, 2023

I noticed a bug during slicing for a record of ragged lists. This PR fixes the bug, which was introduced during the backend addition.

@agoose77 agoose77 marked this pull request as ready for review August 16, 2023 21:40
@agoose77 agoose77 force-pushed the agoose77/fix-slice-listoffsetarray branch from f863d64 to 7bf8964 Compare August 16, 2023 21:40
@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Merging #2653 (41c037d) into main (eff0a81) will increase coverage by 0.03%.
The diff coverage is n/a.

Additional details and impacted files
Files Changed Coverage Δ
src/awkward/contents/listoffsetarray.py 82.86% <ø> (+1.44%) ⬆️

@agoose77 agoose77 temporarily deployed to docs-preview August 16, 2023 21:54 — with GitHub Actions Inactive
Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

This will be ready to go as soon as the tests pass. I'm going to try my own suggestion to see if that's it.

Comment on lines 420 to 421
if head is NO_HEAD:
return self
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
if head is NO_HEAD:
return self
if ak._util.win:
advanced = advanced.to_nplike(self._backend.nplike)
if head is NO_HEAD:
return self

It seems that only Windows needs this cast. (Maybe, depending on what the other Windows tests would have done if they had been allowed to run, and maybe the test would fail on Windows even without this line and we're looking at something else.)

https://github.com/scikit-hep/awkward/actions/runs/5884127678/job/15958232220?pr=2653

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think I've fixed it - oversight on my part :)

Copy link
Member

Choose a reason for hiding this comment

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

In that case, I'll enable auto-merge. Disable it if you see something else.

@jpivarski jpivarski temporarily deployed to docs-preview August 16, 2023 22:40 — with GitHub Actions Inactive
@agoose77 agoose77 force-pushed the agoose77/fix-slice-listoffsetarray branch from 30bb165 to 41c037d Compare August 16, 2023 22:40
@jpivarski jpivarski enabled auto-merge (squash) August 16, 2023 22:42
@agoose77 agoose77 temporarily deployed to docs-preview August 16, 2023 23:21 — with GitHub Actions Inactive
@jpivarski jpivarski merged commit 61c3660 into main Aug 16, 2023
33 checks passed
@jpivarski jpivarski deleted the agoose77/fix-slice-listoffsetarray branch August 16, 2023 23:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants