Skip to content

Commit 983ba28

Browse files
committed
Restore eig pullback
1 parent 40d5d1a commit 983ba28

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/pullbacks/eig.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@ function eig_pullback!(
4646
Δgauge ≤ gauge_atol ||
4747
@warn "`eig` cotangents sensitive to gauge choice: (|Δgauge| = $Δgauge)"
4848
49-
VᴴΔV ./= conj.(transpose(D) .- D)
50-
diagview(VᴴΔV) .= zero(eltype(VᴴΔV))
49+
VᴴΔV .*= conj.(inv_safe.(transpose(D) .- D, degeneracy_atol))
5150
5251
if !iszerotangent(ΔDmat)
5352
ΔDvec = diagview(ΔDmat)

0 commit comments

Comments
 (0)