using NLsolve
function g!(G,x)
G .= [x[1]^2-x[2] for i in 1:3]
end
nlsolve(g!,[0.1, 0.1])
This code gives a DimensionMismatch("array could not be broadcast to match destination")
When I instead use G .= [x[1]^2-x[2] for i in 1:2] I don't get the error. It seems like NLsolve wants th input to be the same size as the output. Is this a bug or am I doing something wrong?