[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error saving empty matrix in HDF5 format
From: |
David Bateman |
Subject: |
Re: error saving empty matrix in HDF5 format |
Date: |
Sun, 7 Mar 2004 14:03:32 +0100 |
User-agent: |
Mutt/1.4.1i |
According to John W. Eaton <address@hidden> (on 03/05/04):
>
> I don't know what the best solution is.
>
> Unfortunately, since HDF does not handle zero-length dimensions
> directly, that means that we have to insert kluges for every N-d
> type. For example, it seems that with the latest CVS I can save and
> reload an empty N-d numeric array, but not an empty N-d cell array.
Ok, that was an oversight... Just add
dim_vector d = dims ();
int empty = save_hdf5_empty (loc_id, name, d);
if (empty != 0)
return (empty > 0);
At the top of save_hdf5 functions and
dim_vector dv;
int empty = load_hdf5_empty (loc_id, name, dv);
if (empty > 0)
matrix.resize(dv);
if (empty != 0)
return (empty > 0);
At the top of the load_hdf5 function should be all that is needed for all
Nd-array types..
> Perhaps we need to get the attention of the HDF people and get them to
> handle zero-length dimensions?
Probably.... Anyone already been in contact with them? In any case this
would have to be done quickly since if my hack gets entrenched, then
it will be harder to replace it. It will also mean that octave would only
be compatiable with version containing the ability to save empty matrices.
So everyone using HDF5 would have to upgrade....
D.
--
David Bateman address@hidden
Motorola CRM +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax)
91193 Gif-Sur-Yvette FRANCE
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
- Re: error saving empty matrix in HDF5 format, David Bateman, 2004/03/01
- Re: error saving empty matrix in HDF5 format, David Bateman, 2004/03/01
- Re: error saving empty matrix in HDF5 format, David Bateman, 2004/03/01
- Re: error saving empty matrix in HDF5 format, John W. Eaton, 2004/03/01
- Re: error saving empty matrix in HDF5 format, David Bateman, 2004/03/02
- Re: error saving empty matrix in HDF5 format, Paul Kienzle, 2004/03/02
- Re: error saving empty matrix in HDF5 format, David Bateman, 2004/03/03
- Re: error saving empty matrix in HDF5 format, John W. Eaton, 2004/03/05
- Re: error saving empty matrix in HDF5 format,
David Bateman <=
- Re: error saving empty matrix in HDF5 format, Paul Kienzle, 2004/03/07
- Re: error saving empty matrix in HDF5 format, John W. Eaton, 2004/03/12