We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Python 2 fails to np.save a large array in this line.
np.save
$ /data/pnl/soft/pnlpipe3/Slicer-4.10.2-linux-amd64/python-realWithExtensions.sh
>>> np.save('/PHShome/tb571/dqc_tmp.npy', [img[0],img[0][...,1], '3']) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/data/pnl/soft/pnlpipe3/Slicer-4.10.2-linux-amd64/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-linux-x86_64.egg/numpy/lib/npyio.py", line 509, in save pickle_kwargs=pickle_kwargs) File "/data/pnl/soft/pnlpipe3/Slicer-4.10.2-linux-amd64/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-linux-x86_64.egg/numpy/lib/format.py", line 576, in write_array pickle.dump(array, fp, protocol=2, **pickle_kwargs) SystemError: error return without exception set
numpy/numpy#2396 and https://bugs.python.org/issue11564
As mentioned in the first reference, it should be fixed in Python 3.
>>> np.save('/PHShome/tb571/dqc_tmp.npy', [img[0][...,:100],img[0][...,1], '3']) >>> np.save('/PHShome/tb571/dqc_tmp.npy', [img[0][...,:200],img[0][...,1], '3']) >>> np.save('/PHShome/tb571/dqc_tmp.npy', [img[0][...,:300],img[0][...,1], '3']) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/data/pnl/soft/pnlpipe3/Slicer-4.10.2-linux-amd64/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-linux-x86_64.egg/numpy/lib/npyio.py", line 509, in save pickle_kwargs=pickle_kwargs) File "/data/pnl/soft/pnlpipe3/Slicer-4.10.2-linux-amd64/lib/Python/lib/python2.7/site-packages/numpy-1.13.1-py2.7-linux-x86_64.egg/numpy/lib/format.py", line 576, in write_array pickle.dump(array, fp, protocol=2, **pickle_kwargs) SystemError: error return without exception set
Checked and confirmed no problem in Python 3.
Wait until Slicer 4.11 stable is released and potentially modify SlicerDiffusionQC to work with Python 3 (should be compatible already).
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
Python 2 fails to
np.save
a large array in this line.Reference
numpy/numpy#2396 and https://bugs.python.org/issue11564
As mentioned in the first reference, it should be fixed in Python 3.
Additional info
Checked and confirmed no problem in Python 3.
Solution
Wait until Slicer 4.11 stable is released and potentially modify SlicerDiffusionQC to work with Python 3 (should be compatible already).
The text was updated successfully, but these errors were encountered: