From b62e2579f77983f48f7bc52e96d5d31d5d8e42b2 Mon Sep 17 00:00:00 2001 From: Antoine Levitt Date: Mon, 21 Oct 2024 15:35:13 +0200 Subject: [PATCH] Force convert diagonal to real in eigen(::Hermitian) (#1280) This matches the behavior for normal arrays --- src/eigen.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/eigen.jl b/src/eigen.jl index 9c599fd4..60208f08 100644 --- a/src/eigen.jl +++ b/src/eigen.jl @@ -57,9 +57,9 @@ end end Sreal = real(S) - @inbounds a11 = convert(Sreal, A.data[1]) - @inbounds a22 = convert(Sreal, A.data[5]) - @inbounds a33 = convert(Sreal, A.data[9]) + @inbounds a11 = convert(Sreal, real(A.data[1])) + @inbounds a22 = convert(Sreal, real(A.data[5])) + @inbounds a33 = convert(Sreal, real(A.data[9])) if A.uplo == 'U' @inbounds a12 = convert(S, A.data[4]) @inbounds a13 = convert(S, A.data[7])