-
Notifications
You must be signed in to change notification settings - Fork 112
Handle (new) buffer protocol conforming types in Pickle.decode
#143
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
Changes from all commits
a2dca8e
1c184f8
d4be3dc
8d1a4ba
f9eecdf
f6e6d98
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -147,6 +147,10 @@ def check_encode_decode_array(arr, codec): | |
| codec.decode(enc, out=out) | ||
| assert_array_items_equal(arr, out) | ||
|
|
||
| enc = codec.encode(arr) | ||
| dec = codec.decode(ensure_ndarray(enc)) | ||
| assert_array_items_equal(arr, dec) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems this worked for everything except |
||
|
|
||
|
|
||
| def check_config(codec): | ||
| config = codec.get_config() | ||
|
|
||
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.
Just to provide context from the Python codebase, Python 2 requires
byteshere and Python 3 uses the (new) buffer protocol to get a C-contiguous array.