diff --git a/stdlib/LinearAlgebra/src/eigen.jl b/stdlib/LinearAlgebra/src/eigen.jl index 9cd1c9bc20f4b0..229baf947bbdbf 100644 --- a/stdlib/LinearAlgebra/src/eigen.jl +++ b/stdlib/LinearAlgebra/src/eigen.jl @@ -685,6 +685,10 @@ function show(io::IO, mime::MIME{Symbol("text/plain")}, F::Union{Eigen,Generaliz nothing end +function ==(A::Eigen, B::Eigen) + return A.values == B.values && A.vectors == B.vectors +end + # Conversion methods ## Can we determine the source/result is Real? This is not stored in the type Eigen diff --git a/stdlib/LinearAlgebra/test/eigen.jl b/stdlib/LinearAlgebra/test/eigen.jl index 487c72d2e01f41..58ca124ee90b5a 100644 --- a/stdlib/LinearAlgebra/test/eigen.jl +++ b/stdlib/LinearAlgebra/test/eigen.jl @@ -170,5 +170,7 @@ end @test eigmax(A') == eigmax(copy(A')) end +A = randn(3, 3) +@test eigen(A) == eigen(A) end # module TestEigen