julia lang - Saving a new variable to a .jld (or hdf5) file while preserving contents -


is there cleverer way add variable .jld file read in , rewrite variable? think possible using hdf5 find if implemented in jld package yet.

this way doing @ moment.

using jld if isfile(filename)     = load(filename) #load vars     jldopen(filename, "w") file         (k,v) in #rewrite original vars             write(file, k, v)         end         write(file, "additional_variable", add_var) #write new var     end end 

you should open file mode r+ instead of w

jldopen(filename, "r+") file     write(file, "additional_variable", add_var) end 

Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -