-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
Writing with bson(file, dict) seems to modify the dict argument.
Is this the intended behaviour?
Julia-1.1.0> using BSON
Julia-1.1.0> d = Dict(:a => [1+2im, 3+4im], :b => "Hello, World!")
Dict{Symbol,Any} with 2 entries:
:a => Complex{Int64}[1+2im, 3+4im]
:b => "Hello, World!"
Julia-1.1.0> d2 = copy(d)
Dict{Symbol,Any} with 2 entries:
:a => Complex{Int64}[1+2im, 3+4im]
:b => "Hello, World!"
Julia-1.1.0> bson("test.bson", d)
Julia-1.1.0> d
Dict{Symbol,Any} with 2 entries:
:a => Dict{Symbol,Any}(:tag=>"array",:type=>Dict{Symbol,Any}(:tag=>"datatype",:params=>Any[Dict{Symbol,Any}(:tag=>"datatype",:params=>Any[],:name=>Any["Main", "Core", "Int64"])],:name=>Any["Main", …
:b => "Hello, World!"
Julia-1.1.0> d3 = BSON.load("test.bson")
Dict{Symbol,Any} with 2 entries:
:a => Complex{Int64}[1+2im, 3+4im]
:b => "Hello, World!"
Julia-1.1.0> d3 == d
false
Julia-1.1.0> d3 == d2
true
racinmat and BoZenKhaa
Metadata
Metadata
Assignees
Labels
No labels