julia> a = zeros(5)
5-element Array{Float64,1}:
 0.0
 0.0
 0.0
 0.0
 0.0

julia> a[1:3][1:2] = 1.0
1.0

julia> a
5-element Array{Float64,1}:
 0.0
 0.0
 0.0
 0.0
 0.0

I understand that `a[1:3]` creates an extra array and then `a[1:3][1:2] = 
1.0` modified the extra array rather than the origin `a`.

Is it an intended behavior?
I come from R where `a[1:3][1:2] = 1.0` works as I expect...

Reply via email to