8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
numpy.ma.load() fails on files generated bu numpy.ma.dump() in python3. See the following code:
from __future__ import print_function import sys import numpy as np print("Python version:", sys.version) print("Numpy version:", np.version.full_version) mma = np.ma.ones((4,4)) mma.dump("mma.dat") mmb = np.ma.load("mma.dat")
And now let's run it:
laptop:~/py/Varie/testNPdump$ python testMAdump.py Python version: 2.7.12 (default, Nov 20 2017, 18:23:56) [GCC 5.4.0 20160609] Numpy version: 1.13.3
Now with python3:
lfini@lfini-laptop:~/py/Varie/testNPdump$ python3 testMAdump.py Python version: 3.5.2 (default, Nov 23 2017, 16:37:01) [GCC 5.4.0 20160609] Numpy version: 1.13.3 Traceback (most recent call last): File "testMAdump.py", line 11, in <module> mmb = np.ma.load("mma.dat") File "/usr/local/lib/python3.5/dist-packages/numpy/ma/core.py", line 7868, in load return pickle.load(F) File "/usr/lib/python3.5/codecs.py", line 321, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 0: invalid start byte
The text was updated successfully, but these errors were encountered:
AFAICT, this doesn't work in Python 2 either, check the load result. IIRC, there has been some discussion about removing those masked array functions.
Sorry, something went wrong.
Discussion is at #10045
This is a duplicate of #5491, so we should continue discussion there.
No branches or pull requests
numpy.ma.load() fails on files generated bu numpy.ma.dump() in python3. See the following code:
And now let's run it:
Now with python3:
The text was updated successfully, but these errors were encountered: