Python Numpy, Methods Of Save Data And Variables
I was trying to use python package to save some numerical calculation data to a file. I had seen open() in io and os, which mainly dealt with test file. As I was trying to use scip
Solution 1:
numpy.save
puts your array on disk in binary format.
numpy.savetxt
writes in plain text so it is human-readable but takes more space.
My favorite method is using numpy.memmap
to create arrays that are also synced to disk. They can be opened, read, and worked with just like numpy.ndarrays, but updates are flushed to the file.
Post a Comment for "Python Numpy, Methods Of Save Data And Variables"