BUG: enable working around pickle compatibility issues on Py3 in npy files#5640
Merged
charris merged 3 commits intonumpy:masterfrom Mar 8, 2015
Merged
BUG: enable working around pickle compatibility issues on Py3 in npy files#5640charris merged 3 commits intonumpy:masterfrom
charris merged 3 commits intonumpy:masterfrom
Conversation
3a4a9f0 to
6ee8860
Compare
Member
Author
|
It seems object arrays cannot be loaded at all from npz files on Py2.6, gh-5643, so the corresponding tests are skipped here. |
numpy/lib/tests/test_format.py
Outdated
Member
There was a problem hiding this comment.
Line is too long, also just below this.
Member
|
LGTM modulo long lines. Could you add something in the 1.10 release notes? Probably under improvements. |
…files Add pickle compatibility flags to numpy.save and numpy.load. Allow only combinations that cannot corrupt binary data in Numpy arrays. Use the same default values as Python pickle.
Member
Author
|
Fixed |
numpy/lib/format.py
Outdated
Member
|
I went all pep8 nitpicky on you ;) |
Member
Author
|
ok, folded |
charris
added a commit
that referenced
this pull request
Mar 8, 2015
BUG: enable working around pickle compatibility issues on Py3 in npy files
Member
|
Great. Thanks Pauli. |
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.
Add pickle compatibility flags to numpy.save and numpy.load. Allow only
combinations that cannot corrupt binary data in Numpy arrays. Use the
same default values as Python pickle. These are necessary for enabling
Python 3 to load npy files produced on Python 2, when they contain object arrays.
In particular on the default values for
encoding=:All of this sucks, but I don't see ways out of this.
ASCIIis the default for pickle, and has the advantage of failing noisily rather than in obscure ways.