Skip to content

make ReinterpretArray more Offset-safe #58898

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

adienes
Copy link
Member

@adienes adienes commented Jul 4, 2025

fixes #44243 (and adds more tests besides)

@adienes adienes added arrays [a, r, r, a, y, s] bugfix This change fixes an existing bug labels Jul 4, 2025
@@ -37,10 +39,6 @@ test_many_wrappers(B, (identity, tslow)) do _B
@test @inferred(size(reinterpret(reshape, Int128, _B))) == (3,)
end

test_many_wrappers(C) do Cr
Copy link
Member Author

Choose a reason for hiding this comment

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

just folding this into the same at L163

@adienes adienes marked this pull request as draft July 4, 2025 03:56
@adienes adienes marked this pull request as ready for review July 4, 2025 17:01
@adienes
Copy link
Member Author

adienes commented Jul 7, 2025

I tried also adding a wrapper test for an offset array with non-zero offsets. I think the implementation is actually correct (besides what's fixed in this PR) and the tests would pass, but a lot of the tests check equality against a reference array which are no longer valid if the axes differ, so it requires a larger / more annoying refactoring to the test suite here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s] bugfix This change fixes an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vector indexing of wrappers of ReshapedReinterpretArray fails
1 participant