0

I have saved arrays as npy with sizes around 2GB. Can I somehow load only specific columns,rows with numpy.load ? I did not find a command for that or is there a workaround for that case?

dangee1705
  • 3,445
  • 1
  • 21
  • 40
Liwellyen
  • 433
  • 1
  • 6
  • 19
  • There is the possibility of a memmap'd npy file. See answer here: https://stackoverflow.com/a/4620395/1005575 – Klimaat Mar 24 '18 at 14:20

1 Answers1

0

This is not possible with .npy files. For that kind of problems, it is better recommended to use .h5 files, with the h5py package. You will find an example in this post: h5py: how to read selected rows of an hdf5 file?.

Leonard
  • 2,510
  • 18
  • 37