Skip to content

Commit

Permalink
Fix the eye depreciation (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieugomez authored and pkofod committed Nov 7, 2018
1 parent add27c9 commit 16e4866
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/solvers/newton.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ function newton_(df::OnceDifferentiable,
# FIXME: better selection for lambda, see Nocedal & Wright p. 289
fjac2 = jacobian(df)'*jacobian(df)
lambda = convert(T,1e6)*sqrt(n*eps())*norm(fjac2, 1)
cache.p .= -(fjac2 + lambda*eye(n))\vec(cache.g)
cache.p .= -(fjac2 + lambda * I)\vec(cache.g)
else
throw(e)
end
Expand Down

0 comments on commit 16e4866

Please sign in to comment.