[Numpy-discussion] Fastest way to save a dictionary of numpy record arrays

Vishal Rana ranavishal@gmail....
Tue Jun 15 01:56:38 CDT 2010


Robert,

As you said, I was able to get the results, but I now got a question as
np.load('np.npz') returns me a <class 'numpy.lib.io.NpzFile'> object so does
that mean the data is read directly from the from the npz file and not all
the data is loaded to the memory?

Thanks
Vishal Rana


On Mon, Jun 14, 2010 at 5:08 PM, Robert Kern <robert.kern@gmail.com> wrote:

> On Mon, Jun 14, 2010 at 19:00, Vishal Rana <ranavishal@gmail.com> wrote:
> > Hi,
> > I have dictionary of numpy record arrays, what could be fastest way to
> > save/load to/from a disk. I tried numpy.save() but my dictionary is lost
> and
> > cPickle seems to be slow.
>
> numpy.savez() will save a dictionary of arrays out to a .zip file.
> Each key/value pair will map to a file in the .zip file with a file
> name corresponding to the key.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
>  -- Umberto Eco
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20100614/eee09089/attachment-0001.html 


More information about the NumPy-Discussion mailing list