I can assign a single element of a view:

julia> view(a,:,:)[1,1] = 2
2

julia> a
10x10 Array{Int64,2}:
 2  5  5  5  5  5  5  5  5   5
 5  5  5  5  5  5  5  5  5   5
 5  5  5  5  5  5  5  5  5   5
 1  2  3  4  5  6  7  8  9  10
 1  2  3  4  5  6  7  8  9  10
 1  2  3  4  5  6  7  8  9  10
 1  2  3  4  5  6  7  8  9  10
 1  2  3  4  5  6  7  8  9  10
 1  2  3  4  5  6  7  8  9  10
 1  2  3  4  5  6  7  8  9  10


But this doesn't work?

julia> view(a,:,:)[1,:] = 2
ERROR: `setindex!` has no method matching setindex!
(::ContiguousView{Int64,2,Array{Int64,2}}, ::Int64, ::Int64, 
::UnitRange{Int64})

While this does?

julia> a[1,:]=2
2

So ArrayView is not a 1st-class array?

-- 
Those who fail to understand recursion are doomed to repeat it

Reply via email to