자료 매번 검색하기 귀찮아서 만든 블로그
Julia - jld 사용하여 변수 값 저장, 불러오기 본문
JLD 패키지 : https://github.com/JuliaIO/JLD.jl
GitHub - JuliaIO/JLD.jl: Saving and loading julia variables while preserving native types
Saving and loading julia variables while preserving native types - GitHub - JuliaIO/JLD.jl: Saving and loading julia variables while preserving native types
github.com
간단한 예시
using JLD
a = [1,2,3]
save("my.jld", "MyKey", a)
my.jld는 Dictionary 형태로 저장되었으며, "MyKey" 에는 key의 이름을 지정해준다.
myfile = load("my.jld")
Dict{String, Any} with 1 entry:
"MyKey" => [1, 2, 3]
read, write도 가능하다
jldopen("my.jld", "r") do file
read(file, "MyKey")
end
3-element Vector{Int64}:
1
2
3
'Julia' 카테고리의 다른 글
Julia - MAT 사용하여 .mat 파일 만들기 (0) | 2022.11.04 |
---|---|
Julia - 행렬을 여러 열에 대해 정렬하기 (0) | 2022.10.25 |
Julia - 1차원 배열의 배열을 행렬로 변환하기 (0) | 2022.10.23 |
Julia - Progressbar 사용하기 (0) | 2022.10.21 |
Julia - sizehint! (0) | 2022.02.13 |