Skip to content

Commit

Permalink
nelder-mead: check that at least one starting point has finite value
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Sep 11, 2014
1 parent de95ece commit 72f18ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/nelder_mead.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function nelder_mead{T}(f::Function,
for i in 1:n
@inbounds y[i] = f(p[:, i])
end
any(isfinite(y)) || error("At least one of the starting points must have finite penalty")
f_calls += n

f_x_previous, f_x = NaN, nmobjective(y, m, n)
Expand Down

0 comments on commit 72f18ea

Please sign in to comment.