A = DimArray(fill(NaN, length(x), length(y)), (x=x, y=y))
B = copy(A)
A[1, 1] #NaN
B[1,1] = 100.
A[1, 1] # NaN
copy of a Dictionary of DimArrays does not preform as expected:
# create a dictionary of DimArrays
A = Dict();
items = ["a", "b", "c"];
x = 1:10;
y = 1:10;
for item in items
push!(A, item => DimArray(fill(NaN, length(x), length(y)), (x=x, y=y)))
end;
# copy A
B = copy(A);
A["a"][1,1] # NaN
B["a"][1, 1] = 100.0;
A["a"][1, 1] # 100.0
This behaviour surprised me:
copy of
DimArray
preforms as expected:copy of a
Dictionary
ofDimArrays
does not preform as expected: