[Numpy-discussion] Home for pyhdf5io?
David Warde-Farley
dwf@cs.toronto....
Sat May 23 06:47:46 CDT 2009
On 23-May-09, at 5:36 AM, Albert Thuswaldner wrote:
> So i guess in the long term i have to also add pickling support. In
> the short term i will add warnings for the data types that are not
> supported.
In order to ensure optimal division of labour, I'd suggest simply
basing your pickling support on hdf5pickle, and including it as an
optional dependency, that you detect at runtime (just put the import
in a try block and catch the ImportError). If you have hdf5pickle
installed, pyhdf5io will pickle any objects you try to use save()
with, etc. Otherwise it will just work the way it does now.
I think that satisfies the goals of your project as being a thin
wrapper that provides a simple interface, rather than reinventing the
wheel by re-implementing hdf5 pickling. It also means that there
aren't two, maybe-incompatible ways to pickle an object in HDF5 --
just one (even if you write your implementation to be compatible with
Pauli's, there's opportunity for the codebases to diverge over time).
David
More information about the Numpy-discussion
mailing list