[MATRIX-SIG] Changing shelve...

Konrad Hinsen hinsen@ibs.ibs.fr
Fri, 10 Oct 1997 16:59:50 +0200


> As far as I understand pickle is rather slow, not very memory
> conserving and at the end not portable between different
> applications. Wouldn't it be good to have a simple routine to save raw
> Numpy-arrays in a portable (machine and application) way.

You mean non-Python? I guess netCDF is as close as you can get to a
portable format for that use.

> I think I can build something like that on top of the netcdf
> module. The main drawback of this data format is that it is not easy
> to append to a file. But I don't know if HDF is more flexible in this

Why? You can always add arrays to an existing netCDF file. You
just have to take care of name conflicts somehow, both for the
arrays and the dimensions.

> Besides, also pickle can't append, right?

It's not difficult; you just have to use the "conversion to string"
version and do the file write yourself.

> By the way, thanks Konrad for the inclusion of negativ indexing in the
> netcdfmodule. Are there any other new features?

Bug fixes, a C API for string I/O, and some optimizations. I think
I should start keeping track of changes, and use version numbers...
-- 
-------------------------------------------------------------------------------
Konrad Hinsen                          | E-Mail: hinsen@ibs.ibs.fr
Laboratoire de Dynamique Moleculaire   | Tel.: +33-4.76.88.99.28
Institut de Biologie Structurale       | Fax:  +33-4.76.88.54.94
41, av. des Martyrs                    | Deutsch/Esperanto/English/
38027 Grenoble Cedex 1, France         | Nederlands/Francais
-------------------------------------------------------------------------------

_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________