Equivalent to brine in Julia

I am looking for a convenient way to dump and load variables in Julia, just like pickle does in Python.

Is there a package that does something like myVar = load(myPath) and dump(myVar, myPath) (or similarly f = open(myPath, "r"); myVar = load(f) )?

+6
source share
2 answers

I think that the HDF5 package has the necessary functionality, it is perfect for me, using some custom types and all:

see here:

https://github.com/JuliaLang/HDF5.jl

+4
source

HDF5.jl package has been split into the new HDF5 and JLD package

see here: https://github.com/JuliaLang/JLD.jl

Saving and loading julia variables while saving native types is now possible with JLD

According to doc:

JLD, for which files usually have the extension .jld, is a widely used format for storing data with the Julia programming language. JLD is a specific β€œdialect” of HDF5, a cross-platform, multilingual data storage format most commonly used for scientific data. Compared to "plain" HDF5, JLD files automatically add attributes and naming conventions to store type information for each object.

+3
source

Source: https://habr.com/ru/post/984484/


All Articles