Use buffer_tobytes on non-object types in test#122
Merged
jakirkham merged 2 commits intoNov 9, 2018
Merged
Conversation
When running the `check_backwards_compatibility` test, make sure not to call `buffer_tobytes` on `object` arrays from fixture data. Casting these to bytes doesn't really make sense as it will return representation of pointers in the underlying buffer. Not only are the pointers things we do not want to be comparing, but it is also internal spec to NumPy and Python that really isn't reliable either. So make sure to pass through the `object` arrays as is.
8 tasks
alimanfoo
reviewed
Nov 9, 2018
Member
|
Thanks for catching this! |
alimanfoo
approved these changes
Nov 9, 2018
alimanfoo
left a comment
Member
There was a problem hiding this comment.
Thanks, feel free to merge.
Member
Author
|
Thanks for the review. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pulled out from PR ( #121 )
When running the
check_backwards_compatibilitytest, make sure not to callbuffer_tobytesonobjectarrays from fixture data. Casting these to bytes doesn't really make sense as it will return representation of pointers in the underlying buffer. Not only are the pointers things we do not want to be comparing, but it is also internal spec to NumPy and Python that really isn't reliable either. So make sure to pass through theobjectarrays as is.[Description of PR]
TODO:
tox -e py37passes locallytox -e py27passes locallytox -e docspasses locally