# JuliaLang/julia

Allow Real when scalar-ndexing on 7th+ dimension

• Loading branch information...
1 parent 18cb340 commit 177934f690ada971a8a43601076881d15568d694 carlobaldassi committed Mar 3, 2014
Showing with 6 additions and 6 deletions.
1. +4 −4 base/array.jl
2. +2 −2 base/subarray.jl
 @@ -289,8 +289,8 @@ getindex(A::Array, i0::Real, i1::Real, i2::Real, i3::Real, i4::Real) = getindex(A::Array, i0::Real, i1::Real, i2::Real, i3::Real, i4::Real, i5::Real) = arrayref(A,to_index(i0),to_index(i1),to_index(i2),to_index(i3),to_index(i4),to_index(i5)) -getindex(A::Array, i0::Real, i1::Real, i2::Real, i3::Real, i4::Real, i5::Real, I::Int...) = - arrayref(A,to_index(i0),to_index(i1),to_index(i2),to_index(i3),to_index(i4),to_index(i5),I...) +getindex(A::Array, i0::Real, i1::Real, i2::Real, i3::Real, i4::Real, i5::Real, I::Real...) = + arrayref(A,to_index(i0),to_index(i1),to_index(i2),to_index(i3),to_index(i4),to_index(i5),to_index(I)...) # Fast copy using copy! for Range1 function getindex(A::Array, I::Range1{Int}) @@ -350,8 +350,8 @@ setindex!{T}(A::Array{T}, x, i0::Real, i1::Real, i2::Real, i3::Real, i4::Real) = arrayset(A, convert(T,x), to_index(i0), to_index(i1), to_index(i2), to_index(i3), to_index(i4)) setindex!{T}(A::Array{T}, x, i0::Real, i1::Real, i2::Real, i3::Real, i4::Real, i5::Real) = arrayset(A, convert(T,x), to_index(i0), to_index(i1), to_index(i2), to_index(i3), to_index(i4), to_index(i5)) -setindex!{T}(A::Array{T}, x, i0::Real, i1::Real, i2::Real, i3::Real, i4::Real, i5::Real, I::Int...) = - arrayset(A, convert(T,x), to_index(i0), to_index(i1), to_index(i2), to_index(i3), to_index(i4), to_index(i5), I...) +setindex!{T}(A::Array{T}, x, i0::Real, i1::Real, i2::Real, i3::Real, i4::Real, i5::Real, I::Real...) = + arrayset(A, convert(T,x), to_index(i0), to_index(i1), to_index(i2), to_index(i3), to_index(i4), to_index(i5), to_index(I)...) function setindex!{T<:Real}(A::Array, x, I::AbstractVector{T}) for i in I
 @@ -214,8 +214,8 @@ getindex(s::SubArray, i0::Real, i1::Real, i2::Real, i3::Real, i4::Real) = getindex(s, to_index(i0), to_index(i1), to_index(i2), to_index(i3), to_index(i4)) getindex(s::SubArray, i0::Real, i1::Real, i2::Real, i3::Real, i4::Real, i5::Real) = getindex(s, to_index(i0), to_index(i1), to_index(i2), to_index(i3), to_index(i4), to_index(i5)) -getindex(s::SubArray, i0::Real, i1::Real, i2::Real, i3::Real, i4::Real, i5::Real, is::Int...) = - getindex(s, to_index(i0), to_index(i1), to_index(i2), to_index(i3), to_index(i4), to_index(i5), is...) +getindex(s::SubArray, i0::Real, i1::Real, i2::Real, i3::Real, i4::Real, i5::Real, is::Real...) = + getindex(s, to_index(i0), to_index(i1), to_index(i2), to_index(i3), to_index(i4), to_index(i5), to_index(is)...) getindex(s::SubArray, i::Integer) = s[ind2sub(size(s), i)...]

#### 0 comments on commit `177934f`

Please sign in to comment.