We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9fd18b9 commit a66e165Copy full SHA for a66e165
1 file changed
src/implementations/eigh.jl
@@ -146,11 +146,10 @@ end
146
function eigh_full!(A::Diagonal, DV, alg::DiagonalAlgorithm)
147
check_input(eigh_full!, A, DV, alg)
148
D, V = DV
149
- I = sortperm(diagview(A); by = real)
150
diagA = diagview(A)
151
I = sortperm(diagA; by = real)
152
if D === A
153
- sort!(diagA)
+ permute!(diagA, I)
154
else
155
diagview(D) .= real.(view(diagA, I))
156
end
0 commit comments