Skip to content

Commit ea4a723

Browse files
committed
Comments
1 parent 71f61da commit ea4a723

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

ext/MatrixAlgebraKitGenericSchurExt.jl

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,7 @@ MatrixAlgebraKit.initialize_output(::typeof(eig_full!), A::AbstractMatrix, ::GS_
1313
MatrixAlgebraKit.initialize_output(::typeof(eig_vals!), A::AbstractMatrix, ::GS_QRIteration) = nothing
1414

1515
function MatrixAlgebraKit.eig_full!(A::AbstractMatrix, DV, ::GS_QRIteration)
16-
D_, V_ = GenericSchur.eigen!(A)
17-
D, V = DV
18-
if !isnothing(D)
19-
copyto!(D, Diagonal(D_))
20-
else
21-
D = D_
22-
end
23-
if !isnothing(V)
24-
copyto!(V, V_)
25-
else
26-
V = V_
27-
end
16+
D, V = GenericSchur.eigen!(A)
2817
return Diagonal(D), V
2918
end
3019

test/testsuite/eig.jl

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,7 @@ function test_eig_full(
3434
@test A * V V * D
3535

3636
D2, V2 = @testinferred eig_full!(Ac, (D, V))
37-
@test D2 === D
38-
@test V2 === V
39-
@test A * V V * D
37+
@test A * V2 V2 * D2
4038

4139
Dc = @testinferred eig_vals(A)
4240
@test eltype(Dc) == Tc
@@ -59,9 +57,7 @@ function test_eig_full_algs(
5957
@test A * V V * D
6058

6159
D2, V2 = @testinferred eig_full!(Ac, (D, V); alg)
62-
@test D2 === D
63-
@test V2 === V
64-
@test A * V V * D
60+
@test A * V2 V2 * D2
6561

6662
Dc = @testinferred eig_vals(A; alg)
6763
@test eltype(Dc) == Tc

0 commit comments

Comments
 (0)