Skip to content

Commit d7cf0b2

Browse files
committed
Cleanup
1 parent ef323c0 commit d7cf0b2

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

src/implementations/eigh.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function check_hermitian(A; atol::Real = default_hermitian_tol(A), rtol::Real =
1818
end
1919

2020
function check_input(::typeof(eigh_full!), A::AbstractMatrix, DV, alg::AbstractAlgorithm)
21-
#check_hermitian(A, alg)
21+
check_hermitian(A, alg)
2222
D, V = DV
2323
m = size(A, 1)
2424
@assert D isa Diagonal && V isa AbstractMatrix

src/pullbacks/eig.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ function eig_pullback!(
5555

5656
check_eig_cotangents(D, VᴴΔV; degeneracy_atol, gauge_atol)
5757

58-
VᴴΔV ./= conj.(transpose(D) .- D)
59-
diagview(VᴴΔV) .= zero(eltype(VᴴΔV))
58+
VᴴΔV .*= conj.(inv_safe.(transpose(D) .- D, degeneracy_atol))
6059

6160
if !iszerotangent(ΔDmat)
6261
ΔDvec = diagview(ΔDmat)

0 commit comments

Comments
 (0)