[SciPy-user] Saving Data as Modul!!

Flavio Coelho fccoelho at gmail.com
Mon Nov 6 17:58:18 CST 2006

Just be careful with pickle, last time I checked, Numpy arrays were not

Pylab ( matplotlib offers a function to save and load matrices in csv

import Pylab as P

mymatrix = P.arange(1000)
P.save("data.csv", mymatrix)
mym = P.load("data.csv")


On 11/6/06, Gary Ruben <gruben at bigpond.net.au> wrote:
> Hi Volker,
> If your only requirement is that your data all be stored in a single
> file, you may be able to do this by pickling it if you group it into one
> object first. If you have a lot of disparate data, perhaps building an
> hdf5 file with pytables may be the best solution.
> Gary R.
> Volker Lorrmann wrote:
> > Hi guys,
> >
> > just a short question. How can i save data that´s generated by a script
> > as an python modul, so i can "import" my data later again.
> > Something like export (opposite of import ;) ) would be great.
> > I´m running the script on ipython.I know of pickle. But i just wanna
> > save all data in one modul.
> >
> > Thanks so far
> >
> > Volker Lorrmann
> >
> _______________________________________________
> SciPy-user mailing list
> SciPy-user at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-user

Flávio Codeço Coelho
registered Linux user # 386432
"Laws are like sausages. It's better not to see them being made."
Otto von Bismark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20061106/9791dbae/attachment.html 

More information about the SciPy-user mailing list