Re: [Numpy-discussion] Writing/reading a numeric array to a file
First of all, thanks for your answers. Travis Oliphant <oliphant@ee.byu.edu> schrieb am 09.11.05 20:23:16:
What unneeded functionality is there. SciPy Core is just a Numeric replacement. It does not NEED Atlas, it just uses it if you have it --- exactly the same as Numeric and numarray. It is a misconception to say scipy core needs any thing else but Python installed. So, let's not let that rumor kill convergence to a single package.
I am sorry for this faulty assumption of mine which you have now clarified. I had assumed that ATLAS was needed, just because scipy_core would not build on my system w/o a prior install of these libraries. With the knowledge, that it _should_ work, I have just retried to build scipy_core 0.4.2 on my rather fresh installation of Slackware Linux 10.2 (python 2.4.1) and still couldn't get it to build. I have attached the log files out.txt and err.txt to this e-mail, which I got by typing $ python setup.py build 1>out.txt 2>err.txt in the scipy_core main directory. The two files are compressed into a single tar.gz archive (5k), because I do not know if 60k attachments are o.k. on this list. Maybe you can help me solve my problem?
(4) What solutions do you use to save/load data to files?
SciPy core arrays have tofile methods and a fromfile function. They are raw reading and writing --- nothing fancy. You need to use Pickling if you want to recognize endian-ness among platforms. What is your opposition to Pickling?
From how I understood pickling, it converts the python objects to a binary representation. What I want is a data representation that is independent of python. Anyway, I now have a few possibilities to explore besides netcdf (with the alternative file formats FITS and with pytables, i.e. HDF5, proposed here).
I think you should take a look at PyTables for more elegant solutions.
I wasn't sure if it will stay compatible to scipy_core, because right now it uses numarray. But from what you said I am sure that eventually pytables might also switch to scipy_core. Best regards, and thanks for your efforts, Niklas. ______________________________________________________________________ XXL-Speicher, PC-Virenschutz, Spartarife & mehr: Nur im WEB.DE Club! Jetzt gratis testen! http://freemail.web.de/home/landingpad/?mc=021130
On Thu, 10 Nov 2005, Niklas Volbers wrote:
First of all, thanks for your answers.
Travis Oliphant <oliphant@ee.byu.edu> schrieb am 09.11.05 20:23:16:
What unneeded functionality is there. SciPy Core is just a Numeric replacement. It does not NEED Atlas, it just uses it if you have it --- exactly the same as Numeric and numarray. It is a misconception to say scipy core needs any thing else but Python installed. So, let's not let that rumor kill convergence to a single package.
I am sorry for this faulty assumption of mine which you have now clarified.
I had assumed that ATLAS was needed, just because scipy_core would not build on my system w/o a prior install of these libraries.
With the knowledge, that it _should_ work, I have just retried to build scipy_core 0.4.2 on my rather fresh installation of Slackware Linux 10.2 (python 2.4.1) and still couldn't get it to build. I have attached the log files out.txt and err.txt to this e-mail, which I got by typing
$ python setup.py build 1>out.txt 2>err.txt
in the scipy_core main directory. The two files are compressed into a single tar.gz archive (5k), because I do not know if 60k attachments are o.k. on this list.
Maybe you can help me solve my problem?
Did you try a recent check out? With Travis' speed of coding scipy_core version 0.4.2.1252 seems pretty old to me I tested In [95]: scipy.__core_version__ Out[95]: '0.4.3.1440' this morning without problems. Best, Arnd
With the knowledge, that it _should_ work, I have just retried to build scipy_core 0.4.2 on my rather fresh installation of Slackware Linux 10.2 (python 2.4.1) and still couldn't get it to build. I have attached the log files out.txt and err.txt to this e-mail, which I got by typing
$ python setup.py build 1>out.txt 2>err.txt
in the scipy_core main directory. The two files are compressed into a single tar.gz archive (5k), because I do not know if 60k attachments are o.k. on this list.
Maybe you can help me solve my problem?
Did you try a recent check out? With Travis' speed of coding scipy_core version 0.4.2.1252 seems pretty old to me
I tested In [95]: scipy.__core_version__ Out[95]: '0.4.3.1440' this morning without problems.
That was a wonderful idea! I checked out 0.4.3.1456 and it works just fine. Thank you very much. BTW, I checked out the source via $ svn co http://svn.scipy.org/svn/scipy_core/branches/newcore which took me a while to find (it was on the conference paper about scipy). Best regards, Niklas.
A Dijous 10 Novembre 2005 13:34, Niklas Volbers va escriure:
I think you should take a look at PyTables for more elegant solutions.
I wasn't sure if it will stay compatible to scipy_core, because right now it uses numarray. But from what you said I am sure that eventually pytables might also switch to scipy_core.
Just to make things clear, PyTables uses numarray at its core, yes, but it does support Numeric also by doing conversions in the fastest way available (in fact, many people uses PyTables just for keeping Numeric arrays, with good results). Still, a copy in memory is needed for numarray-->Numeric conversions (not for the Numeric-->numarray way), but that will change very soon, after the array protocol implementation in numarray (and Numeric) stabilizes. The next step will be to offer support for scipy.core by using the array protocol as well. And finally, we plan (probably with the introduction of PyTables 2) to switch from numarray to scipy.core when the later would be stable enough, but always with support of the triad of numarray, Numeric and scipy.core, at least for a few years. Nevertheless, you must be aware that PyTables does require the HDF5 libraries [1], so, if what you want is to get rid of the maximum of dependencies, PyTables might be effectively overkill for you. [1] http://hdf.ncsa.uiuc.edu/HDF5/ Cheers, --
0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-"
participants (4)
-
Arnd Baecker -
Francesc Altet -
N. Volbers -
Niklas Volbers