On 07/13/2014 1:10 PM, Simone Stefano wrote: > dpb <email@example.com> wrote in message <firstname.lastname@example.org>... > >> Well, clearly for the inputs you passed, costfunction did _not_ return >> a constant. You note it takes four inputs but you passed vectors >> instead of single values; one presumes the function has been >> vectorized and given multiple inputs it returns multiple outputs. >> >> Would need to see code for it to tell that for absolute certain but >> it's almost got to be given the symptoms and diagnostic information. >> > > Thanks for you answer > > Costfunction returns just one number. Inside the cost function there is > the sum of the all inputs multiplied for some weights. > There is a way to avoid this problem?
The error clearly said it did _not_ return just one number. Again, need to see details on it to tell anything more.