I'm sure a pull request would be appreciated. Alternatively, SubArrays do work
the way you are hoping for.
--Tim
On Wednesday, March 25, 2015 07:19:50 AM Neal Becker wrote:
> 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?