diff --git a/test/mma.jl b/test/mma.jl index 183f026..0b57af9 100755 --- a/test/mma.jl +++ b/test/mma.jl @@ -1,6 +1,6 @@ using NonconvexMMA, LinearAlgebra, Test, Zygote -f(x::AbstractVector) = sqrt(x[2]) +f(x::AbstractVector) = x[2] < 0 ? Inf : sqrt(x[2]) g(x::AbstractVector, a, b) = (a*x[1] + b)^3 - x[2] options = MMAOptions(