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

Handle some corner-cases in indexing with boolean masks #13402

Merged
merged 3 commits into from
May 25, 2023

Conversation

wence-
Copy link
Contributor

@wence- wence- commented May 22, 2023

Description

These must be treated specially and not accidentally converted to integers before indexing.

Introduces tighter guards for loc-based indexing with Series where in some circumstances one must align the indices of the indexed object and the indexer. These now raise NotImplementedError rather than returning incorrect answers.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@github-actions github-actions bot added the Python Affects Python cuDF API. label May 22, 2023
@wence-
Copy link
Contributor Author

wence- commented May 22, 2023

Note, this was discussed as probably wanted for 23.06 at the last cudf meeting; I haven't yet added tests but will do so on Wednesday.

These must be treated specially and not accidentally converted to
integers before indexing.

- Closes rapidsai#13015
- Closes rapidsai#13265
- Closes rapidsai#13270
@wence- wence- added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 24, 2023
@wence- wence- marked this pull request as ready for review May 24, 2023 13:22
@wence- wence- requested a review from a team as a code owner May 24, 2023 13:22
@wence- wence- requested review from vyasr and isVoid May 24, 2023 13:22
raise NotImplementedError(
"Cannot use Series object for mask iloc indexing"
)
# TODO: Doesn't handle on-device columns
Copy link
Contributor Author

Choose a reason for hiding this comment

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

But the old code didn't either...

@wence-
Copy link
Contributor Author

wence- commented May 25, 2023

/merge

@rapids-bot rapids-bot bot merged commit 85699df into rapidsai:branch-23.06 May 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Archived in project
2 participants