Skip to content

Commit 4b1655e

Browse files
committed
fix for julia 1.7
1 parent 27c272d commit 4b1655e

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

test/rulesets/LinearAlgebra/structured.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
@testset "\\ $T on LHS" for T in (Diagonal, UpperTriangular, LowerTriangular)
99
LHS = T(randn(T == Diagonal ? 10 : (10, 10)))
10-
test_rrule(\, LHS, randn(Float32, 10); rtol = 1.0e-4, atol = 1.0e-4)
11-
test_rrule(\, LHS, randn(Float32, 10, 10); rtol = 1.0e-4, atol = 1.0e-4)
10+
test_rrule(\, LHS, randn(Float32, 10); rtol = 1.0e-3, atol = 1.0e-3)
11+
test_rrule(\, LHS, randn(Float32, 10, 10); rtol = 1.0e-3, atol = 1.0e-3)
1212
end
1313
end
1414

test/rulesets/LinearAlgebra/symmetric.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,9 @@
305305
U = Matrix(qr(randn(T, n, n)).Q)
306306
if hermout # f(A) will also be a TA
307307
λ = if f in (acos, asin, atanh)
308-
2 .* rand(real(T), n) .- 1
308+
# generate random number between -1 and 0.9. This would be between
309+
# -1 and 1 but we want to avoid domain errors from numerical error
310+
1.9 .* rand(real(T), n) .- 1
309311
elseif f in (log, sqrt)
310312
abs.(randn(real(T), n))
311313
elseif f === acosh

0 commit comments

Comments
 (0)