Fix to_array to return non-corrupted data#22342
Merged
Merged
Conversation
mroeschke
reviewed
May 1, 2026
Co-authored-by: Matthew Roeschke <10647082+mroeschke@users.noreply.github.com>
Contributor
Author
|
pre-commit.ci autofix |
mroeschke
approved these changes
May 6, 2026
Contributor
Author
|
/okay to test 9c1ea79 |
Contributor
Author
|
/merge |
Contributor
Author
|
/okay to test d56651c |
galipremsagar
added a commit
to galipremsagar/cudf
that referenced
this pull request
May 8, 2026
Fixes rapidsai#22136 This PR gueared the homogeneous numeric `DataFrame.to_cupy` fast path so it only uses `table_to_array` when `dtype` is `None` or exactly matches the source column `dtype`. Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) - https://github.com/apps/pre-commit-ci Approvers: - Matthew Roeschke (https://github.com/mroeschke) URL: rapidsai#22342
shrshi
pushed a commit
to shrshi/cudf
that referenced
this pull request
May 12, 2026
Fixes rapidsai#22136 This PR gueared the homogeneous numeric `DataFrame.to_cupy` fast path so it only uses `table_to_array` when `dtype` is `None` or exactly matches the source column `dtype`. Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) - https://github.com/apps/pre-commit-ci Approvers: - Matthew Roeschke (https://github.com/mroeschke) URL: rapidsai#22342
rapids-bot Bot
pushed a commit
that referenced
this pull request
May 14, 2026
Fixes #22136 Follow-up to #22342. Cast at the cudf column level when an explicit `dtype` differs from the source column's dtype, so `s.to_cupy(dtype=X)` matches `s.astype(X).to_cupy()` for string, datetime, bool, and other non-numeric sources (instead of raising `cupy does not support object`). Authors: - GALI PREM SAGAR (https://github.com/galipremsagar) Approvers: - Matthew Murray (https://github.com/Matt711) URL: #22485
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
Fixes #22136
This PR gueared the homogeneous numeric
DataFrame.to_cupyfast path so it only usestable_to_arraywhendtypeisNoneor exactly matches the source columndtype.Checklist