[Numpy-discussion] numpy.savez(_compressed) in loop

Chris Barker chris.barker at noaa.gov
Wed Oct 31 20:08:12 EDT 2012


On Mon, Oct 29, 2012 at 1:37 PM, David Warde-Farley
<d.warde.farley at gmail.com> wrote:

> This is something of a hack.

but a cool one...

> Like Pauli said, it's probably worthwhile to consider HDF5.

But HDF5 is a big dependency -- it can be a pain to build. IT's great
for what it does well, and great for interchanging data with other
systems that use it, but if all you need to do is save and reload
arrays, it's pretty heavy weight -- that's why save and savez were
written.

It looks like the python zipfile module supports adding to existing
zip files, to It should be pretty easy to add this functionality to
savez (and savez_compressed) pretty cleanly.

I'll bet a patch would be accepted!

-Chris



-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov



More information about the NumPy-Discussion mailing list