ArrayViews.jl icon indicating copy to clipboard operation
ArrayViews.jl copied to clipboard

Improper View Error

Open JaredCrean2 opened this issue 10 years ago • 2 comments

I stumbled upon this behavior today:

julia> a = rand(5)
5-element Array{Float64,1}:
 0.123137
 0.370571
 0.740451
 0.857524
 0.143512

julia> view(a, :, 2)
5-element ArrayViews.ContiguousView{Float64,1,Array{Float64,1}}:
 #undef
 #undef
 #undef
 #undef
 #undef

Should this be an error?

JaredCrean2 avatar Oct 22 '15 19:10 JaredCrean2

Is this still relevant?

andreasnoack avatar Jun 05 '18 08:06 andreasnoack

The behavior is unchanged on master:

julia> a = rand(5)
5-element Array{Float64,1}:
 0.76569 
 0.124087
 0.332332
 0.293954
 0.801056

julia> aview(a, :, 2)
5-element ArrayViews.ContiguousView{Float64,1,Array{Float64,1}}:
 #undef
 #undef
 #undef
 #undef
 #undef

JaredCrean2 avatar Jun 05 '18 20:06 JaredCrean2