[SciPy-User] Should I use pickle for numpy array?

Paul Anton Letnes paul.anton.letnes at gmail.com
Mon Sep 19 13:59:21 EDT 2011


On Mon, Sep 19, 2011 at 3:15 PM, Klonuo Umom <klonuo at gmail.com> wrote:
> Thanks for your replies
>
> I guess I was just looking for numpy.save/load
>
> and if I face portability issue of huge data in future, then I'll
> consider h5py ;)
>
>
> Cheers
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user

I must admit I prefer h5py, even for small amounts of data. The tree
like structure of the data makes organizing your arrays so much
easier.

>>> import h5py
>>> f = h5py.File('example.hdf5', 'w')
>>> import numpy
>>> f['my_array'] = numpy.arange(10)
>>> f.close()

Almost as easy to use as numpy.save(), too.

Cheers,
Paul



More information about the SciPy-User mailing list