Great. Thank you.
There is a problem when the determinant of the matrix is zero, per example :
julia> using LinearAlgebra
julia> using GenericSchur
julia> eigvecs(BigFloat.([0 0 1 0; 0 0 0 0; -1 0 0 0; 0 0 0 0]))
ERROR: ArgumentError: iteration limit 400 reached
Stacktrace:
[1] _gschur!(::Hessenberg{BigFloat,UpperHessenberg{BigFloat,Array{BigFloat,2}},Array{BigFloat,2},Array{GenericSchur.Householder{BigFloat,S} where S<:(StridedArray{T, 1} where T),1},Bool}, ::Array{BigFloat,2}; tol::BigFloat, debug::Bool, shiftmethod::Symbol, maxiter::Int64, standardize::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/ymocquar/.julia/packages/GenericSchur/YzsRq/src/GenericSchur.jl:377
[2] _gschur! at /Users/ymocquar/.julia/packages/GenericSchur/YzsRq/src/GenericSchur.jl:359 [inlined]
[3] gschur!(::Array{BigFloat,2}; wantZ::Bool, scale::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/ymocquar/.julia/packages/GenericSchur/YzsRq/src/GenericSchur.jl:630
[4] gschur! at /Users/ymocquar/.julia/packages/GenericSchur/YzsRq/src/GenericSchur.jl:617 [inlined]
[5] #schur!#1 at /Users/ymocquar/.julia/packages/GenericSchur/YzsRq/src/GenericSchur.jl:12 [inlined]
[6] schur! at /Users/ymocquar/.julia/packages/GenericSchur/YzsRq/src/GenericSchur.jl:12 [inlined]
[7] schur at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/schur.jl:143 [inlined]
[8] eigen!(::Array{BigFloat,2}; permute::Bool, scale::Bool, sortby::typeof(LinearAlgebra.eigsortby)) at /Users/ymocquar/.julia/packages/GenericSchur/YzsRq/src/GenericSchur.jl:69
[9] eigen(::Array{BigFloat,2}; permute::Bool, scale::Bool, sortby::typeof(LinearAlgebra.eigsortby)) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/eigen.jl:237
[10] eigen at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/eigen.jl:235 [inlined]
[11] #eigvecs#70 at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/eigen.jl:257 [inlined]
[12] eigvecs(::Array{BigFloat,2}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/LinearAlgebra/src/eigen.jl:257
[13] top-level scope at REPL[35]:1
Thanks for the report. Iām currently revising the methods for real element types, to deal with edge cases like this. In the interim please try adding 0im
to make the matrix complex.