Skip to content

Commit

Permalink
Update EllipsisNotation.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Apr 14, 2017
1 parent 9c744b1 commit 843e92f
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions src/EllipsisNotation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,6 @@ module EllipsisNotation
setindex!{T}(A::AbstractArray{T,9}, x, n::Int, ::Type{Val{:..}}) = A[n, :, :, :, :, :, :, :, :] = x
setindex!{T}(A::AbstractArray{T,10}, x, n::Int, ::Type{Val{:..}}) = A[n, :, :, :, :, :, :, :, :, :] = x

#=
setindex!{T}(A::AbstractArray{T,1}, x, n::Int, ::Type{Val{:...}}) = A[n] = x
setindex!{T}(A::AbstractArray{T,2}, x, n::Int, ::Type{Val{:...}}) = A[n, :] = reshape(x,1,size(x,1)) #x
setindex!{T}(A::AbstractArray{T,3}, x, n::Int, ::Type{Val{:...}}) = A[n, :, :] = reshape(x,1,size(x,1),size(x,2)) #x
setindex!{T}(A::AbstractArray{T,4}, x, n::Int, ::Type{Val{:...}}) = A[n, :, :, :] = reshape(x,1,size(x,1),size(x,2),size(x,3)) #x
setindex!{T}(A::AbstractArray{T,5}, x, n::Int, ::Type{Val{:...}}) = A[n, :, :, :, :] = reshape(x,1,size(x,1),size(x,2),size(x,3),size(x,4)) #x
setindex!{T}(A::AbstractArray{T,6}, x, n::Int, ::Type{Val{:...}}) = A[n, :, :, :, :, :] = reshape(x,1,size(x,1),size(x,2),size(x,3),size(x,4),size(x,5)) #x
setindex!{T}(A::AbstractArray{T,7}, x, n::Int, ::Type{Val{:...}}) = A[n, :, :, :, :, :, :] =
reshape(x,1,size(x,1),size(x,2),size(x,3),size(x,4),size(x,5),size(x,6)) #x
setindex!{T}(A::AbstractArray{T,8}, x, n::Int, ::Type{Val{:...}}) = A[n, :, :, :, :, :, :, :] =
reshape(x,1,size(x,1),size(x,2),size(x,3),size(x,4),size(x,5),size(x,6),size(x,7)) #x
setindex!{T}(A::AbstractArray{T,9}, x, n::Int, ::Type{Val{:...}}) = A[n, :, :, :, :, :, :, :, :] =
reshape(x,1,size(x,1),size(x,2),size(x,3),size(x,4),size(x,5),size(x,6),size(x,7),size(x,8)) #x
setindex!{T}(A::AbstractArray{T,10}, x, n::Int, ::Type{Val{:...}}) = A[n, :, :, :, :, :, :, :, :, :] =
reshape(x,1,size(x,1),size(x,2),size(x,3),size(x,4),size(x,5),size(x,6),size(x,7),size(x,8),size(x,9)) #x
=#

getindex{T}(A::AbstractArray{T,1}, n::Int, ::Type{Val{:..}}) = A[n]
getindex{T}(A::AbstractArray{T,2}, n::Int, ::Type{Val{:..}}) = A[n, :]
getindex{T}(A::AbstractArray{T,3}, n::Int, ::Type{Val{:..}}) = A[n, :, :]
Expand Down

0 comments on commit 843e92f

Please sign in to comment.