Tokazama / AxisIndices.jl

Apply meaningful keys and custom behavior to indices.
MIT License
22 stars 4 forks source link

New ambiguity error on 1.5 #26

Closed KristofferC closed 4 years ago

KristofferC commented 4 years ago

Just a heads up that the tests for this package fail on the upcoming 1.5 due to an ambiguity in overloading multiplication with adjoints:

Vector-Vector: Error During Test at /home/kc/PkgEval15/AxisIndices.jl/test/math_tests.jl:107
  Test threw exception
  Expression: av' * av == adjoint(v) * av == transpose(v) * av
  MethodError: *(::Adjoint{Int64,Array{Int64,1}}, ::AxisIndicesArray{Int64,1,Array{Int64,1},Tuple{Axis{Int64,Int64,UnitRange{Int64},OneTo{Int64}}}}) is ambiguous. Candidates:
    *(u::Adjoint{T,var"#s822"} where var"#s822"<:(AbstractArray{T,1} where T), v::AbstractArray{T,1}) where T<:Number in LinearAlgebra at /home/kc/julia/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/adjtrans.jl:268
    *(a::Adjoint{var"#s28",var"#s27"} where var"#s27"<:(AbstractArray{T,1} where T) where var"#s28", b::AbstractAxisIndices{T,1,var"#s29",AI} where AI where var"#s29"<:AbstractArray{T,1}) where T in AxisIndices.Math at /home/kc/PkgEval15/AxisIndices.jl/src/Math/matmul.jl:65
  Possible fix, define
    *(::Adjoint{T,var"#s27"} where var"#s27"<:(AbstractArray{T,1} where T), ::AbstractAxisIndices{T,1,var"#s29",AI} where AI where var"#s29"<:AbstractArray{T,1}) where T<:Number
  Stacktrace:
   [1] top-level scope at /home/kc/PkgEval15/AxisIndices.jl/test/math_tests.jl:107
   [2] top-level scope at /home/kc/julia/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1114
   [3] top-level scope at /home/kc/PkgEval15/AxisIndices.jl/test/math_tests.jl:102
   [4] top-level scope at /home/kc/julia/usr/share/julia/stdlib/v1.5/Test/src/Test.jl:1114
   [5] top-level scope at /home/kc/PkgEval15/AxisIndices.jl/test/math_tests.jl:71
Tokazama commented 4 years ago

Thanks for the heads up. I've already got a fix in place for the next release.

KristofferC commented 4 years ago

:+1: