-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BUG: Fix for #10533 np.dtype(ctype) does not respect endianness #12380
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
Conversation
See: #10533 Added some code that uses the __name__ of the ctypes type. Also added some new test to make sure we'll know if the ctypes data that allows this workaround breaks in the future.
Removed the TODO for this bug.
Solved the recursiveness issue that failed the automated test. Also did some of Eric's requested changes.
'if t.__ctypes_be__ is t' on Eric's suggestion.
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.
Looks great, thanks! I plan to squash together all the commits when I merge
Thank you for the review Eric! I enjoyed working on this. I'll go choose some other bug today to check out. |
I was thinking the same. I will wait a few days and if he won't reply I will send a PR. I was also looking at #11304 to work on. |
Thanks @bmakos and Eric. |
…umpy#12380) * BUG: Fix for numpy#10533 np.dtype(ctype) does not respect endianness See: numpy#10533 Added some code that uses the __name__ of the ctypes type. Also added some new test to make sure we'll know if the ctypes data that allows this workaround breaks in the future. * Fix for numpy#10533 np.dtype(ctype) does not respect endianness Removed the TODO for this bug. * Fix for numpy#10533 np.dtype(ctype) does not respect endianness Solved the recursiveness issue that failed the automated test. Also did some of Eric's requested changes. * Small mistake in the new function fixed. * Changed 'if t.__name__.endswith('_be') ' with 'if t.__ctypes_be__ is t' on Eric's suggestion. * Code cleanup on Eric's recommendations. * Cleaned up the tests on Eric's suggestions.
See: #10533
Added some code that uses the name of the ctypes type. Also
added some new test to make sure we'll know if the ctypes data
that allows this workaround breaks in the future.