[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error saving empty matrix in HDF5 format
From: |
John W. Eaton |
Subject: |
Re: error saving empty matrix in HDF5 format |
Date: |
Fri, 12 Mar 2004 13:13:42 -0600 |
On 7-Mar-2004, David Bateman <address@hidden> wrote:
| 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..
I made this change.
Thanks,
jwe
- Re: error saving empty matrix in HDF5 format, (continued)
- 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, 2004/03/07
- Re: error saving empty matrix in HDF5 format, Paul Kienzle, 2004/03/07
- Re: error saving empty matrix in HDF5 format,
John W. Eaton <=