I'm finding the maximum of a function f over the parameter nu in Python using Scipy's built-in differential evolution, while keeping the other terms (args) fixed. My code
max = scipy.optimize.differential_evolution(lambda nu:-f(args,nu),bounds)
fopt = max.fun
Gives me the correct value I desire. However, now I want to do the same thing but vary over two parameters; call them nu and mu. I tried
max = scipy.optimize.differential_evolution(lambda nu,mu:-f(args,nu,mu),bounds)
fopt = max.fun
But I get an error. What is the correct way to implement optimization over several parameters using the above?