array attribute and hdfview

Hello all

I found out that hdfview is not able to display array which is created in following way (C++):

void saveAttrArray(const H5::Group &group, const char *name, const float *ar, int size)
{
   hsize_t dims = size;
   H5::DataSpace ds(H5S_SCALAR);
   H5::ArrayType har(H5::PredType::NATIVE_FLOAT, 1, &dims);
   H5::Attribute attr(group.createAttribute(name, har, ds));
   attr.write(har, ar);
}

It shows array size=1 (that is may be OK) and all elements as 0!

h5dump happily dumps array correctly without any problem.

Is this problem of hdfview? Do I do anything wrong?

···

--
Best regards, Sergey Spiridonov

Sergey,

Thank you very much for reporting the issue. We will check it and come back to you.

Thanks
--pc

···

On 9/5/2012 4:51 AM, Sergey Spiridonov wrote:

Hello all

I found out that hdfview is not able to display array which is created in following way (C++):

void saveAttrArray(const H5::Group &group, const char *name, const float *ar, int size)
{
  hsize_t dims = size;
  H5::DataSpace ds(H5S_SCALAR);
  H5::ArrayType har(H5::PredType::NATIVE_FLOAT, 1, &dims);
  H5::Attribute attr(group.createAttribute(name, har, ds));
  attr.write(har, ar);
}

It shows array size=1 (that is may be OK) and all elements as 0!

h5dump happily dumps array correctly without any problem.

Is this problem of hdfview? Do I do anything wrong?