Skip to content

Commit

Permalink
Merge pull request #1150 from JuliaRobotics/hotfix/21Q1/optim_residual
Browse files Browse the repository at this point in the history
Update residual in _solveLambdaNumeric optim
  • Loading branch information
Affie authored Feb 6, 2021
2 parents 7faae50 + f620750 commit e7ce108
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/NumericalCalculations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ function _solveLambdaNumeric( fcttype::Union{F,<:Mixture{N_,F,S,T}},
#
# wrt #467 allow residual to be standardize for Roots and Minimize and Parametric cases.
r = if islen1
optimize((x) -> (residual = objResX(x); sum(residual.^2)), u0, BFGS() )
optimize((x) -> (residual .= objResX(x); sum(residual.^2)), u0, BFGS() )
else
optimize((x) -> (residual = objResX(x); sum(residual.^2)), u0)
optimize((x) -> (residual .= objResX(x); sum(residual.^2)), u0)
end

#
Expand Down

0 comments on commit e7ce108

Please sign in to comment.