-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
BUG: Fix alignment errors due to relaxed stride checking #14893
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @peterbell10! I will wait for the CI and merge. Why this is only happening on windows?
Well it's strange that the non-aligned strides even exist. It looks as though NumPy is not writing to the stride of the length-1 dimension at all. Is it possible this is a fixed bug and the windows build is just using an older NumPy version? |
Maybe it's fixed on main, but not in the latest release at least since I am using |
Oh well, in that case I have no idea why the strides are different on windows. |
CI failures are not related, merging and 🤞 for windows. |
(cherry picked from commit cd1c680)
Reference issue
Fixes errors in MacPython/scipy-wheels#132
What does this implement/fix?
NumPy's relaxed stride checking explicitly ignores length-1 dimensions, so if we don't as well then there will be false-positives as we were seeing in the windows build with python 3.10.
https://github.com/numpy/numpy/blob/5cb560616abe44774d897a80970775d2a26bb03b/numpy/core/src/common/array_assign.c#L114-L118