Skip to content

Commit

Permalink
Switch eigvals to return complex values
Browse files Browse the repository at this point in the history
  • Loading branch information
lkdvos committed Jun 11, 2024
1 parent fe0f672 commit dcb0b2b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/tensors/factorizations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

"""
Expand Down

0 comments on commit dcb0b2b

Please sign in to comment.