From dcb0b2bcc5f2ea4b620c5b8ffaa8ca5a7132bab9 Mon Sep 17 00:00:00 2001 From: lkdvos Date: Mon, 10 Jun 2024 18:00:53 +0200 Subject: [PATCH] Switch eigvals to return complex values --- src/tensors/factorizations.jl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/tensors/factorizations.jl b/src/tensors/factorizations.jl index 99b98cdb..565b0747 100644 --- a/src/tensors/factorizations.jl +++ b/src/tensors/factorizations.jl @@ -182,12 +182,13 @@ function LinearAlgebra.eigvals(t::AbstractTensorMap; kwargs...) return LinearAlgebra.eigvals!(copy(t); kwargs...) end function LinearAlgebra.eigvals!(t::AbstractTensorMap; kwargs...) - return SectorDict(c => LinearAlgebra.eigvals!(b; kwargs...) for (c, b) in blocks(t)) + return SectorDict(c => complex(LinearAlgebra.eigvals!(b; kwargs...)) + for (c, b) in blocks(t)) end # TODO: decide if we want to keep these specializations: function LinearAlgebra.eigvals!(t::TrivialTensorMap; kwargs...) - return LinearAlgebra.eigvals!(t.data; kwargs...) + return complex(LinearAlgebra.eigvals!(t.data; kwargs...)) end """