Skip to content

Commit 545d307

Browse files
committed
Add identity to matrix
1 parent 2fea65e commit 545d307

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

test/lapack.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -687,11 +687,7 @@ end
687687
@testset for elty in (Float32, Float64, ComplexF32, ComplexF64)
688688
local n = 10
689689
a = randn(elty, n, n)
690-
# generate a symmetric positive definite matrix as Q*D*Q',
691-
# where Q is orthogonal, and D contains the eigenvalues
692-
Q, _ = qr(a)
693-
D = Diagonal(rand(real(elty), n) .+ real(oneunit(elty)))
694-
A = Matrix(Hermitian(Q*D*Q')) # ensure that the matrix is exactly hermitian
690+
A = a'*a + I
695691
B = rand(elty, n, n)
696692
D = copy(A)
697693
C = copy(B)

0 commit comments

Comments
 (0)