Skip to content

Commit 38273fd

Browse files
authored
Ensure positive-definite matrix in lapack posv test (#1238)
The test failure in https://buildkite.com/julialang/linearalgebra-dot-jl/builds/330#01954c88-5de5-42fb-a0b4-e10f487d934e is because the matrix is not positive-definite. Since we construct the matrix by ourselves, we may ensure that the eigenvalues are all positive by defining it as ~~`Q*D*Q'` for an orthogonal `Q`~~ `A'A + I`. This way we avoid such floating-point issues.
2 parents 79650d3 + 545d307 commit 38273fd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/lapack.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ end
687687
@testset for elty in (Float32, Float64, ComplexF32, ComplexF64)
688688
local n = 10
689689
a = randn(elty, n, n)
690-
A = a'*a
690+
A = a'*a + I
691691
B = rand(elty, n, n)
692692
D = copy(A)
693693
C = copy(B)

0 commit comments

Comments
 (0)