You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia>using ArrayInterface, OffsetArrays, Test
julia> amb = Test.detect_ambiguities(ArrayInterface, OffsetArrays)
5-element Vector{Tuple{Method, Method}}:
(getindex(x::ArrayInterface.LazyAxis, i::AbstractUnitRange{var"#s15"}wherevar"#s15"<:Integer) in ArrayInterface at /home/chriselrod/.julia/packages/ArrayInterface/CYf5x/src/axes.jl:293, getindex(r::AbstractUnitRange, s::Base.IdentityUnitRange{var"#s1"}wherevar"#s1"<:(AbstractUnitRange{var"#s2"} where var"#s2"<:Integer)) in OffsetArrays at /home/chriselrod/.julia/packages/OffsetArrays/EYLoR/src/OffsetArrays.jl:513)
(getindex(r::ArrayInterface.OptionallyStaticUnitRange, s::AbstractUnitRange{var"#s15"}wherevar"#s15"<:Integer) in ArrayInterface at /home/chriselrod/.julia/packages/ArrayInterface/CYf5x/src/ranges.jl:296, getindex(r::AbstractUnitRange, s::OffsetArrays.IdOffsetRange) in OffsetArrays at /home/chriselrod/.julia/packages/OffsetArrays/EYLoR/src/OffsetArrays.jl:513)
(getindex(r::ArrayInterface.OptionallyStaticUnitRange, s::AbstractUnitRange{var"#s15"}wherevar"#s15"<:Integer) in ArrayInterface at /home/chriselrod/.julia/packages/ArrayInterface/CYf5x/src/ranges.jl:296, getindex(r::AbstractUnitRange, s::Base.IdentityUnitRange{var"#s1"}wherevar"#s1"<:(AbstractUnitRange{var"#s2"} where var"#s2"<:Integer)) in OffsetArrays at /home/chriselrod/.julia/packages/OffsetArrays/EYLoR/src/OffsetArrays.jl:513)
(getindex(x::AbstractArray, ::AbstractTrees.ImplicitRootState) in AbstractTrees at /home/chriselrod/.julia/packages/AbstractTrees/oHb1F/src/iteration.jl:103, getindex(A::ArrayInterface.AbstractArray2, args...) in ArrayInterface at /home/chriselrod/.julia/packages/ArrayInterface/CYf5x/src/ArrayInterface.jl:607)
(getindex(x::ArrayInterface.LazyAxis, i::AbstractUnitRange{var"#s15"}wherevar"#s15"<:Integer) in ArrayInterface at /home/chriselrod/.julia/packages/ArrayInterface/CYf5x/src/axes.jl:293, getindex(r::AbstractUnitRange, s::OffsetArrays.IdOffsetRange) in OffsetArrays at /home/chriselrod/.julia/packages/OffsetArrays/EYLoR/src/OffsetArrays.jl:513)
julia>for (a1,a2) ∈ amb
println(a1, "\n", a2, "\n")
endgetindex(x::ArrayInterface.LazyAxis, i::AbstractUnitRange{var"#s15"}wherevar"#s15"<:Integer) in ArrayInterface at /home/chriselrod/.julia/packages/ArrayInterface/CYf5x/src/axes.jl:293getindex(r::AbstractUnitRange, s::Base.IdentityUnitRange{var"#s1"}wherevar"#s1"<:(AbstractUnitRange{var"#s2"} where var"#s2"<:Integer)) in OffsetArrays at /home/chriselrod/.julia/packages/OffsetArrays/EYLoR/src/OffsetArrays.jl:513getindex(r::ArrayInterface.OptionallyStaticUnitRange, s::AbstractUnitRange{var"#s15"}wherevar"#s15"<:Integer) in ArrayInterface at /home/chriselrod/.julia/packages/ArrayInterface/CYf5x/src/ranges.jl:296getindex(r::AbstractUnitRange, s::OffsetArrays.IdOffsetRange) in OffsetArrays at /home/chriselrod/.julia/packages/OffsetArrays/EYLoR/src/OffsetArrays.jl:513getindex(r::ArrayInterface.OptionallyStaticUnitRange, s::AbstractUnitRange{var"#s15"}wherevar"#s15"<:Integer) in ArrayInterface at /home/chriselrod/.julia/packages/ArrayInterface/CYf5x/src/ranges.jl:296getindex(r::AbstractUnitRange, s::Base.IdentityUnitRange{var"#s1"}wherevar"#s1"<:(AbstractUnitRange{var"#s2"} where var"#s2"<:Integer)) in OffsetArrays at /home/chriselrod/.julia/packages/OffsetArrays/EYLoR/src/OffsetArrays.jl:513getindex(x::AbstractArray, ::AbstractTrees.ImplicitRootState) in AbstractTrees at /home/chriselrod/.julia/packages/AbstractTrees/oHb1F/src/iteration.jl:103getindex(A::ArrayInterface.AbstractArray2, args...) in ArrayInterface at /home/chriselrod/.julia/packages/ArrayInterface/CYf5x/src/ArrayInterface.jl:607getindex(x::ArrayInterface.LazyAxis, i::AbstractUnitRange{var"#s15"}wherevar"#s15"<:Integer) in ArrayInterface at /home/chriselrod/.julia/packages/ArrayInterface/CYf5x/src/axes.jl:293getindex(r::AbstractUnitRange, s::OffsetArrays.IdOffsetRange) in OffsetArrays at /home/chriselrod/.julia/packages/OffsetArrays/EYLoR/src/OffsetArrays.jl:513
The text was updated successfully, but these errors were encountered:
chriselrod
changed the title
Ambiguities with OffsetArraysgetindex method ambiguities with OffsetArraysJun 18, 2021
chriselrod
changed the title
getindex method ambiguities with OffsetArraysgetindex method ambiguities with AbstractTrees, Base, and OffsetArraysJun 18, 2021
As a temporary fix perhaps OffsetArrays may limit its piracy to ranges defined in Base. That should fix this, and it's unlikely that packages specifically depend on this behavior for range types that that they define.
So:
(::ArrayInterface.LazyAxis)[i::Base.IdentityUnitRange]
(::ArrayInterface.OptionallyStaticUnitRange)[::OffsetArrays.IdOffsetrange]
(::ArrayInterface.OptionallyStaticUnitRange)[::Base.IdentityUnitRange]
(::ArrayInterface.AbstractArray2)[::AbstractTrees.ImplicitRootState]
(ArrayInterface.LazyAxis)[OffsetArrays.IdOffsetRange]
The text was updated successfully, but these errors were encountered: