JLD file , how to add new line to existing array in jld file?

Ho to add new data to existingg Array in jld file

julia> f=jldopen("file.jld","w")
julia> close(f)
julia> f=jldopen("file.jld","r+")
julia> write(f,"A",rand(5,5))
julia> read(f,"A")
5×5 Array{Float64,2}:
 0.626607  0.14594     0.343371  0.114918  0.306783
 0.854831  0.00995706  0.838906  0.179565  0.269296
 0.941415  0.951582    0.470253  0.703651  0.862343
 0.686263  0.20181     0.952839  0.846292  0.522481
 0.486758  0.0271853   0.795502  0.055506  0.207617

How to add new vector (as new row or column )b=rand(5)
Thanks, Paul

Since JLD is basically augmented HDF5, you should be able to use HDF5.jl’s set_dim! to resize the dataset and then insert the new data. If I find the time, I’ll post an example.

1 Like

Thanks I found , set_dim! with s set_dims!
Paul

2 Likes

In next post about adding String in JLD, plese look !