We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
eigmax
eigmin
Implementing eigvals for an AbstractMatrix gets you eigmin but not eigmax.
eigvals
AbstractMatrix
I think the definition for eigmax should change StridedMatrix -> AbstractMatrix (to match the definition of eigmin)?
StridedMatrix
Example:
julia> using LinearAlgebra julia> struct MyMat{T} <: AbstractMatrix{T} data::AbstractMatrix{T} end julia> Base.getindex(m::MyMat, i, j) = getindex(m.data, i, j) julia> Base.size(m::MyMat) = size(m.data) julia> LinearAlgebra.eigvals(m::MyMat; kwargs...) = eigvals(m.data; kwargs...) julia> M = MyMat(rand(3,3)) 3×3 MyMat{Float64}: 0.316192 0.915257 0.559555 0.153994 0.978667 0.406342 0.114911 0.249647 0.87979 julia> eigvals(M) 3-element Array{Float64,1}: 1.4367338354952857 0.13582144904446486 0.6020940832444935 julia> eigmin(M) 0.13582144904446486 julia> eigmax(M) ERROR: MethodError: no method matching eigmax(::MyMat{Float64}) Closest candidates are: eigmax(::SymTridiagonal) at /Users/osx/buildbot/slave/package_osx64/build/usr/share/julia/stdlib/v1.1/LinearAlgebra/src/tridiag.jl:227
The text was updated successfully, but these errors were encountered:
I agree. It would be great if you could prepare a PR.
Sorry, something went wrong.
(related #620)
actually should be fixed by JuliaLang/julia#31117 :D
Looks like this is fixed and can be closed? The above code does no longer error.
No branches or pull requests
Implementing
eigvals
for anAbstractMatrix
gets youeigmin
but noteigmax
.I think the definition for
eigmax
should changeStridedMatrix
->AbstractMatrix
(to match the definition ofeigmin
)?Example:
The text was updated successfully, but these errors were encountered: