Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Method ambiguity in eigen with Julia 1.11 #141

Closed
amilsted opened this issue Oct 25, 2024 · 0 comments · Fixed by #142
Closed

Method ambiguity in eigen with Julia 1.11 #141

amilsted opened this issue Oct 25, 2024 · 0 comments · Fixed by #142

Comments

@amilsted
Copy link

julia> using LinearAlgebra

julia> using GenericLinearAlgebra

julia> M = Hermitian(Tridiagonal(ones(ComplexF64, 2), ones(ComplexF64, 3), ones(ComplexF64, 2)))
3×3 Hermitian{ComplexF64, Tridiagonal{ComplexF64, Vector{ComplexF64}}}:
 1.0+0.0im  1.0+0.0im          
 1.0-0.0im  1.0+0.0im  1.0+0.0im
           1.0-0.0im  1.0+0.0im

julia> eigen(M)
ERROR: MethodError: eigen(::Hermitian{ComplexF64, Tridiagonal{ComplexF64, Vector{ComplexF64}}}) is ambiguous.

Candidates:
  eigen(A::Hermitian{var"#s451", S} where {var"#s451"<:Complex, S<:(AbstractMatrix{<:var"#s451"})})
    @ GenericLinearAlgebra ~/.julia/packages/GenericLinearAlgebra/XnHLQ/src/eigenSelfAdjoint.jl:658
  eigen(A::Hermitian{Complex{T}, <:Tridiagonal}; kwargs...) where T
    @ LinearAlgebra ~/.julia/juliaup/julia-1.11.1+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/LinearAlgebra/src/symmetriceigen.jl:299

Possible fix, define
  eigen(::Hermitian{Complex{T}, <:Union{Tridiagonal{…} where {…}, Tridiagonal{…} where {…}}}) where T<:Real

Stacktrace:
 [1] top-level scope
   @ REPL[19]:1
Some type information was truncated. Use `show(err)` to see complete types.

julia> versioninfo()
Julia Version 1.11.1
Commit 8f5b7ca12ad (2024-10-16 10:53 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 10 × Apple M1 Pro
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 8 virtual cores)
Environment:
  JULIA_PKG_USE_CLI_GIT = true

Works fine on 1.10.

@amilsted amilsted changed the title Method ambiguity with Julia 1.11 Method ambiguity in eigen with Julia 1.11 Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant