Reshaping a Dataset

I have an HDF5 data file that has some data sets stored as 1D arrays. I would like to somehow change the dimensions on the array to a 3D array. The total number of elements will remain the same, just the dimensions are different. Is there a way to do that in HDF5 quickly? Even a command line program with arguments would be great at this point.

I could probably write a short program to read in the data, then rewrite the data back out with the proper dimensions but I am trying to avoid writing that if I can.

Thanks for any help

···

---
Mike Jackson www.bluequartz.net

Hi Mike,

I have an HDF5 data file that has some data sets stored as 1D arrays. I would like to somehow change the dimensions on the array to a 3D array. The total number of elements will remain the same, just the dimensions are different. Is there a way to do that in HDF5 quickly? Even a command line program with arguments would be great at this point.

Unfortunately not. In order to change dimensionality one has to modify object header information for the dataset. We do not have a public function or utility to do that. How often does this happen? And you know that data can be read into a buffer with different dimensionality, right?

Elena

···

On Jan 13, 2014, at 7:35 PM, Michael Jackson <mike.jackson@bluequartz.net> wrote:

I could probably write a short program to read in the data, then rewrite the data back out with the proper dimensions but I am trying to avoid writing that if I can.

Thanks for any help
---
Mike Jackson www.bluequartz.net

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@lists.hdfgroup.org
http://mail.lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org