I’ve created two YAXArrays from data stored in two separate groups of an HDF5 file.
They share the same dimensions, and I’d like to merge them into a single Dataset.
Is there a recommended way to do this?
I couldn’t find any documentation on combining multiple datasets in YAXArrays.jl.
I tried creating a dictionary to combine the two datasets and then converting it back into a Dataset, but I wasn’t successful — mainly because I’m not sure how to iterate over the variables in a Dataset.
function merge_datasets(ds_list::Vector{Dataset})
datasets = Dict{Symbol, YAXArray}()
for ds in ds_list
for name in Variables(ds)
datasets[name] = ds[name]
end
end
return Dataset(; properties = Dict{String, Any}(), datasets...)
end