From 6b68e5b6ff3eb7a7678e958f17387dfbb1b31fc7 Mon Sep 17 00:00:00 2001 From: Sacha Verweij Date: Wed, 20 Dec 2017 19:53:52 -0800 Subject: [PATCH] Guard against accidental singularity in a sparse linalg test. --- test/sparse/sparse.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/sparse/sparse.jl b/test/sparse/sparse.jl index 4dc81a7619e53..cb8ceeb7aa255 100644 --- a/test/sparse/sparse.jl +++ b/test/sparse/sparse.jl @@ -1672,8 +1672,8 @@ end @testset "sparse matrix cond" begin local A = sparse(reshape([1.0], 1, 1)) - Ac = sprandn(20, 20,.5) + im* sprandn(20, 20,.5) - Ar = sprandn(20, 20,.5) + Ac = sprandn(20, 20,.5) + im*sprandn(20, 20,.5) + Ar = sprandn(20, 20,.5) + eps()*I @test cond(A, 1) == 1.0 # For a discussion of the tolerance, see #14778 if Base.USE_GPL_LIBS