Repository navigation
Fix CuPy indexing, assignment and scalar truth conversion - #11797
Open
wpyaoxueros wants to merge 4 commits into
Open
wpyaoxueros wants to merge 4 commits into
wpyaoxueros wants to merge 4 commits into
Conversation
Prepared with Codex assistance. Public PR authorship and required human review remain pending. Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Codex <noreply@openai.com>
wpyaoxueros
marked this pull request as ready for review
October 23, 2026 15:37
Co-authored-by: Codex <noreply@openai.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Codex on behalf of @wpyaoxueros. Closes #11739.
Contributor confirmation, translated from Chinese: "I have reviewed the changes and found no issues."
CuPy indexers currently fail when they reach pandas-backed coordinates, basic assignment can mix NumPy values with CuPy storage, and scalar truth conversion can trigger an implicit conversion to NumPy. This patch explicitly converts indexers at the pandas boundary, converts assignment values to the target array backend, and uses the underlying array's truth conversion while preserving pandas extension-array handling.
Regression coverage includes vector/multidimensional/argmax indexers, scalar/slice/
.locassignment, scalar CuPy truth values,idxmin/idxmax, and pandas nullable-boolean controls.Remote validation against base
fbc4cf19b919ce23fd0f7d419e9c141f046788a9:These checks ran on the designated Linux GPU workstation. The full repository suite and type checking were not rerun on this commit. The required release-note entry has been added. The contributor has confirmed review of the changes; the remote checks below were executed by Codex.
Documentation CI on
6cbb300failed in the unchangeddoc/internals/time-coding.mdtimestamp example with pandas 3.1.0. A standalone remote pandas-only check reproducesOutOfBoundsDatetimefor thesandmsunits without importing xarray; the same check passes with pandas 3.0.6. The follow-up commit only moves this PR's release note into the unreleased section. This is a known documentation-check failure, not a claim that the complete documentation build passes.Checklist
whats-new.rstAI Disclosure
Tool: Codex. Task scope: address the CuPy indexing, assignment and scalar-bool failures reported in #11739, with regression tests and validation on the remote workstation. Codex prepared the six-file patch, ran the reported checks, prepared this description and submitted the PR at the contributor's explicit request. The contributor's own review confirmation is quoted above. No personal execution of the agent-run tests is claimed.