Skip to content

Commit 964a8be

Browse files
committed
Rename variable + remove duplicate Block call
1 parent 6c3a45f commit 964a8be

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/abstractblocksparsearray/abstractblocksparsematrix.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ function svd(
77
A::AbstractBlockSparseMatrix; full::Bool=false, alg::Algorithm=default_svd_alg(A)
88
)
99
T = LinearAlgebra.eigtype(eltype(A))
10-
A′ = try_to_blockdiagonal(A)
10+
A′_and_blockperms = try_to_blockdiagonal(A)
1111

12-
if isnothing(A′)
12+
if isnothing(A′_and_blockperms)
1313
# not block-diagonal, fall back to dense case
1414
Adense = eigencopy_oftype(A, T)
1515
return svd!(Adense; full, alg)
@@ -18,5 +18,5 @@ function svd(
1818
# compute block-by-block and permute back
1919
A″, (I, J) = A′
2020
F = svd!(eigencopy_oftype(A″, T); full, alg)
21-
return SVD(F.U[Block.(I), Block.(J)], F.S, F.Vt)
21+
return SVD(F.U[I, J], F.S, F.Vt)
2222
end

0 commit comments

Comments
 (0)