ENH: reshape: test copy= kwarg - #432
Merged
Merged
Conversation
ev-br
marked this pull request as draft
March 22, 2026 10:33
Member
Author
|
cross-ref #108 |
Member
Author
|
Cupy issue to add the copy= argument to reshape: cupy/cupy#10039 |
Member
Author
|
The array-api-strict failure seems to be which a kind of makes sense: if there's no data to share, nothing's shared. So it'll need a tweak in |
Member
Author
|
It looks like that after data-apis/array-api-strict#232 and data-apis/array-api-compat#454 by @stanbot8, the only remaining blocker is torch. |
Member
Author
|
All wrapped modules have been fixed (thanks @stanbot8!), the updated test passes locally. We'll be able to improve further when
|
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.
Apparently,
copy=kwarg ofreshapeisnot very wellreasonably well supported:array_api_compatWhere the argument is supported, the test itself needs work:
-strict, zero-sized arrays fail some internal check withcopy=True-- fixed by BUG:reshapeaccept an empty array and copy=False array-api-strict#232numpy, the test generates arrays or numpy scalars, and scalars choke something in the test itself. -- fixed by ENH: use native numpy.reshape for numpy>=2.1 array-api-compat#454