Skip to content

Commit 21dc3a1

Browse files
author
Katharine Hyatt
committed
And one more
1 parent 5ee3b69 commit 21dc3a1

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/implementations/svd.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,8 @@ function svd_trunc_no_error!(A::AbstractMatrix, USVᴴ, alg::TruncatedAlgorithm{
398398
(Utr, Str, Vᴴtr), _ = truncate(svd_trunc!, (U, S, Vᴴ), alg.trunc)
399399

400400
do_gauge_fix = get(alg.alg.kwargs, :fixgauge, default_fixgauge())::Bool
401-
do_gauge_fix && gaugefix!(svd_trunc!, Utr, Vᴴtr)
401+
# the output matrices here are the same size as for svd_full!
402+
do_gauge_fix && gaugefix!(svd_full!, Utr, Vᴴtr)
402403

403404
return Utr, Str, Vᴴtr
404405
end

test/testsuite/svd.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,6 @@ function test_randomized_svd(T::Type, sz, algs; kwargs...)
322322
minmn = min(m, n)
323323
S₀ = collect(svd_vals(A))
324324
U1, S1, V1ᴴ, ϵ1 = @testinferred svd_trunc(A; alg)
325-
@test length(diagview(S1)) == alg.k
326325
@test collect(diagview(S1))[1:alg.k] S₀[1:alg.k]
327326
end
328327
end

0 commit comments

Comments
 (0)