Hi,
I have a h5 file which has a 3-D matrix (30x500x500 with unlimited length) dataset.
I can extend the dataset to 60x500x500 by reset the size to [60,500,500]. By this way the space is enlarged, so I can write more data immediately after the old data.
However, now I need to insert the new 30x500x500 to the beginning of dataset, not following the old dataset. This means I need to “push/shift” the old data to the extending end, then “overwrite” the new data from the origin.
A way I can think of is:
(1) Enlarge the dataset dimension as needed.
(2) copy-paste (shift) the 500X500 slices one-by-one from the end of old data to end of new container. Then empty space are available at the origin of dataset.
(3) write the new dataset from the origin side.
It seems thatstep (2) takes substantial time. Is there a native way to directly shift dataset along first dimension?
Thanks