Skip to content

Commit 8190cab

Browse files
committed
fix diagonal adjoint implementation
1 parent aac9227 commit 8190cab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/factorizations/adjoint.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ function MAK.svd_trunc!(t::AdjointTensorMap, USVᴴ, alg::TruncatedAlgorithm)
109109
USVᴴ′ = svd_compact!(t, USVᴴ, alg.alg)
110110
return MAK.truncate(svd_trunc!, USVᴴ′, alg.trunc)
111111
end
112-
function MAK.svd_compact!(t::AdjointTensorMap, USVᴴ, alg::DiagonalAlgorithm)
113-
return MAK.svd_compact!(t, USVᴴ, alg.alg)
112+
function MAK.svd_compact!(t::AdjointTensorMap, F, alg::DiagonalAlgorithm)
113+
F′ = svd_compact!(adjoint(t), reverse(adjoint.(F)), _adjoint(alg))
114+
return reverse(adjoint.(F′))
114115
end

0 commit comments

Comments
 (0)