JuliaMath / JuliaMath/Interpolations.jl
`to_indices` dispatch ambiguity
- Dominant language
- Julia
- Stars
- 575
- Forks
- 117
- PR merge metrics
- No merged PRs in 30d
Description
I'm posting here rather than AxisIndices because I checked `src/Interpolations.jl:273` and found a comment stating that the offending method is at a "non-exported point in the dispatch hierarchy" in order "to avoid ambiguities with methods that specialize on the array type." The comment seems to be incorrect.
```
MethodError: to_indices(::AxisArray{Float64,1,Array{Float64,1},Tuple{Axis{Float64,Int64,StepMRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},OneToMRange{Int64}}}}, ::Tuple{Int64}) is ambiguous. Candidates:
to_indices(A::AbstractAxisArray{T,1,P,Tuple{Ax1}}, args::Tuple{Arg1}) where {T, P, Ax1, Arg1<:Integer} in AxisIndices.Arrays at /home/graham/.julia/packages/AxisIndices/FXEqg/src/Arrays/indexing.jl:19
to_indices(A, I::Tuple{Vararg{Union{Int64, Interpolations.WeightedIndex},N} where N}) in Interpolations at /home/graham/.julia/packages/Interpolations/TBuvH/src/Interpolations.jl:273
to_indices(A::AbstractAxisArray, I::Tuple{Integer}) in AxisIndices.Arrays at /home/graham/.julia/packages/AxisIndices/FXEqg/src/Arrays/indexing.jl:6
Possible fix, define
to_indices(::AbstractAxisArray{T,1,P,Tuple{Ax1}}, ::Tuple{Int64}) where {T, P, Ax1}
```
(Interpolations v0.12.10)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.