-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
base: master
Are you sure you want to change the base?
make ReinterpretArray more Offset-safe #58898
Conversation
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. |
one thing to note is that L91 actually makes the defensive another option would be to make the implementation given that this expands the test coverage to two full new wrappers, only changes erroring paths into non-errors (and does not touch any non-erroring paths), and the implementation seems pretty uncontroversial to me, absent protest I'll merge this by the end of the week |
fixes #44243 (and adds more tests besides)