I'm storing a numpy arrays in python using np.save command but it is occupying 54.3 GB space. I have to store several such arrays. In which formate should I store such files so that they occupy less memory?
Asked
Active
Viewed 438 times
0
-
1The disk space of a `np.save` file is basically the same as the RAM size of the array. Most of the file is byte image of the array's databuffer. `np.savez_compressed` will create a similar `npy` file, but also applies the `zip` archive compression. That may or maynot make much of a difference. You could also apply `gzip` compression to the `npy`. – hpaulj Dec 07 '20 at 17:15
-
My array has shape (6000,6000). I have to store several such arrays. and then I need to reload them. I'm wondering which command can save space and time efficiently. – joeee Dec 07 '20 at 17:18