Skip to content
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

Cannot save very large sparse matrix #4481

Closed
felixgao opened this issue Mar 11, 2014 · 3 comments
Closed

Cannot save very large sparse matrix #4481

felixgao opened this issue Mar 11, 2014 · 3 comments

Comments

@felixgao
Copy link

I have a very large matrix the full matrix size 35390104 x 28005, currently I am saving them as two small part files, if I tried to combine them and save them as one large sparse matrix I got the following error. The total file size is around 15GB.

Traceback (most recent call last):
File "/home/felix/test.py", line 58, in
main(sys.argv[1:])
File "/home/felix/test.py", line 49, in main
save_npz(matrix, "/tmp/combined_matrix.npz")
File "/home/felix/test.py", line 22, in save_npz
np.savez(output, row=row, col=col, data=data, shape=shape)
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 530, in savez
_savez(file, args, kwds, False)
File "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 592, in _savez
zip.write(tmpfile, arcname=fname)
File "/usr/lib/python2.7/zipfile.py", line 1102, in write
zinfo.file_size))
struct.error: 'L' format requires 0 <= number <= 4294967295

I am using 1.8.0 version of numpy, is there a work around of the zipfile limitation?

@abalkin
Copy link
Contributor

abalkin commented Mar 12, 2014

What version of python are you using? Try 2.7.6 if yours is older.

@pv
Copy link
Member

pv commented Mar 12, 2014

Seems to be this Python bug: http://bugs.python.org/issue9720

@felixgao
Copy link
Author

Using python 2.7.3, don't have access to upgrade it. I will see if I can talk to the IT to get it upgraded. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants