Skip to content

Commit c706c64

Browse files
refactor: use LinearSolve instead of \ in JET test
1 parent dc8abad commit c706c64

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/JET.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
using NonlinearSolve
2+
using LinearSolve
23
using LinearAlgebra
34
using ADTypes
45
using JET
6+
const LS = LinearSolve
57

68
function f(u, p)
79
L, U = cholesky(p.Σ)
8-
return L \ (u .* u .- p.λ)
10+
rhs = (u .* u .- p.λ)
11+
linprob = LinearProblem(Matrix(L), rhs)
12+
alg = LS.GenericLUFactorization()
13+
sol = LinearSolve.solve(linprob, alg)
14+
return sol.u
915
end
1016

1117
function minimize=1.0)

0 commit comments

Comments
 (0)