-
-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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: void dtype setup checked offset not actual pointer for alignment #11180
Conversation
OK, silly me, the problem was that the macro is defined in the local file, and it was defined below... and I missed the first error ;). |
Maybe the macro should be moved all the way up, it is probably pretty random there. |
@@ -760,7 +771,8 @@ _setup_field(int i, PyArray_Descr *descr, PyArrayObject *arr, | |||
} | |||
|
|||
((PyArrayObject_fields *)(arr))->descr = new; | |||
if ((new->alignment > 1) && ((offset % new->alignment) != 0)) { | |||
if ((new->alignment > 1) && ( |
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.
The (
would look better on the next line.
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.
Committer can fix later if needed.
This commit also adds an assert and closes numpygh-11088
LGTM. |
Thanks Sebastian. |
This commit also adds an assert and closes gh-11088
Ok, the assert, its still in there with sizeof, which is probably OK here, but not right generally....