Skip to content

Commit d29d4d1

Browse files
authored
Stabilize tests by using randn (#420)
1 parent 518af61 commit d29d4d1

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

test/factorizations/svd.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ for V in spacelist
2121
@testset "Condition number and rank" begin
2222
for T in eltypes,
2323
t in (
24-
rand(T, W, W), rand(T, W, W)',
25-
rand(T, (V1 V2 V3), (V4 V5)'), rand(T, (V1 V2)', (V3 V4 V5))',
26-
rand(T, (V1 V2), (V3 V4 V5)'), rand(T, (V1 V2 V3)', (V4 V5))',
24+
randn(T, W, W), randn(T, W, W)',
25+
randn(T, (V1 V2 V3), (V4 V5)'), randn(T, (V1 V2)', (V3 V4 V5))',
26+
randn(T, (V1 V2), (V3 V4 V5)'), randn(T, (V1 V2 V3)', (V4 V5))',
2727
DiagonalTensorMap(rand(T, reduceddim(Vd)), Vd),
2828
)
2929

@@ -47,7 +47,7 @@ for V in spacelist
4747
@test rank(t2) == 0
4848
@test cond(t2) == 0.0
4949
end
50-
for T in eltypes, t in (rand(T, W, W), rand(T, W, W)')
50+
for T in eltypes, t in (randn(T, W, W), randn(T, W, W)')
5151
project_hermitian!(t)
5252
vals = @constinferred LinearAlgebra.eigvals(t)
5353
λmax = maximum(s -> maximum(abs, s), values(vals))

0 commit comments

Comments
 (0)