Mistake in the `SubArray` doc?


#1

I’m looking at this section where A is a Array{Float64, 3} and S1 = view(A, :, 5, 2:6). I’m then confused by the explanation follows:

If in our example above A is a Array{Float64, 3}, our S1 case above would be a SubArray{Int64,2,Array{Int64,3},Tuple{Colon,Int64,UnitRange{Int64}},false}.

Why isn’t it SubArray{Float64,2,Array{Float64,3},Tuple{Colon,Int64,UnitRange{Int64}},false}?

Thanks!


#2

Fixed here: https://github.com/JuliaLang/julia/pull/23298


#3

Fair enough. Thanks. One more question - Why Colon is changed to Base.OneTo{Int64}?