-
Hi all, Is it feasible to replace an existing dataset with data that may have a different shape? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can "delete" a dataset with:
and create a new dataset. The issue is that unlinking will not automatically shrink the size of the file. I think it'll (sometimes) mark the space as unused and then reuse it if possible. You can use Note that the special case of a growing dataset is typically solved differently. One creates a DataSet that's unlimited in the direction in which it'll grow. Then one can later resize the dataset in the unlimited direction and overwrite data as needed. |
Beta Was this translation helpful? Give feedback.
You can "delete" a dataset with:
and create a new dataset. The issue is that unlinking will not automatically shrink the size of the file. I think it'll (sometimes) mark the space as unused and then reuse it if possible. You can use
h5repack
to copy the file, but eliminating all gaps in the original file.Note that the special case of a growing dataset is typically solved differently. One creates a DataSet that's unlimited in the direction in which it'll grow. Then one can later resize the dataset in the unlimited direction and overwrite data as needed.