Skip to content

Commit b0a90bd

Browse files
leburgelJutho
andcommitted
Update src/pullbacks/eigh.jl
Co-authored-by: Jutho <Jutho@users.noreply.github.com>
1 parent 801b93e commit b0a90bd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎src/pullbacks/eigh.jl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function check_and_prepare_eigh_cotangents(
3636
if !iszerotangent(ΔDmat)
3737
ΔD = diagview(ΔDmat)
3838
k == length(ΔD) || throw(DimensionMismatch())
39-
VᴴAΔV[ind′ .+ p .* (0:(k - 1))] .+= real.(ΔD) # the entries (ind′[l], l)
39+
diagview(view(VᴴAΔV, ind′, :)) .+= real.(ΔD)
4040
else
4141
ΔD = nothing
4242
end

0 commit comments

Comments
 (0)