I have several .h5 files (one file per day) each containing one dataset. I tried to combine them to one large .h5 file using h5py package with the following code:
with h5py.File(combined_file_path, "w") as combined_file:
for file_path in file_paths:
with h5py.File(file_path, "r") as data_file:
data_file.copy('/', combined_file)
The variable file_paths
is a list containing paths to all .h5 files. I get the following error in the last line: ValueError: No destination name specified (no destination name specified)
. What is the actual problem with the last code line and how can it be fixed?