octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: error saving empty matrix in HDF5 format


From: Paul Kienzle
Subject: Re: error saving empty matrix in HDF5 format
Date: Mon, 1 Mar 2004 19:38:53 -0500


On Mar 1, 2004, at 8:44 AM, David Bateman wrote:


Ok there is a thread on this exact problem at

http://www.unidata.ucar.edu/projects/coohl/mhonarc/MailArchives/ netcdf-hdf-list/msg00097.html

The bottom line is that, it appears that the HDF people are implementing something like "H5Screate(H5S_EMPTY)" however that doesn't help us, since the dimensionality of our empty matrices won't be maintained.... That is
a rank=n matrix when loaded will become "zeros(zeros(n))" and not the
correct dimensionality.

Frankly, I see no simple way to address this. The only thing I can see is
if we save an attribute in the HDF5 file flagging an empty matrix, then
save the dimensions as a vector. This is slighly incompatibile in that
if other software doesn't check this attribute then they'll end up
loading a 1xN vector with the dimensions of the matrix instead of an
empty matrix.....

Should I go this way?

Can't you put the dimensions themselves in an attribute?  Other
applications could read the empty array and treat it as an empty
array, but octave aware applications could read the empty_dim
attribute and act accordingly.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]