Since julia 0.3.3 I receive the following error message

Warning: New definition 
    getindex(AbstractArray{T,2},Array{Integer,1}) at 
/Users/ortner/Dropbox/Work/Projects/QM_Localisation/jqmmm/TBgeom.jl:74
is ambiguous with: 
    
getindex(SubArray{T,N,A<:AbstractArray{T,N},I<:(Union(Int64,Range{Int64})...,)},Union(AbstractArray{T,1},Real)...)
 at subarray.jl:335.
To fix, define 
    
getindex(SubArray{T,2,A<:AbstractArray{T,N},I<:(Union(Int64,Range{Int64})...,)},Array{Integer,1})
before the new definition.


The offending definitions are

getindex{T}(a::AbstractArray{T,2}, idx::Array{Integer,1}) = a[idx[1], 
idx[2]]
getindex{T}(a::AbstractArray{T,3}, idx::Array{Integer,1}) = a[idx[1], 
idx[2], idx[3]]


What changed? What should I have done? I would ike to better understand the 
"To fix . . ." sentence, before going ahead and fixing this.

Thank you,
   Christoph

Reply via email to