How can I optimize two variables in a three variable function? My understanding was that I can include the last variable in the args parameter, but I cannot make this work. What am I doing wrong here? The idea is that I want to optimize x and y and that z is fixed.
> from scipy.optimize import minimize
> def f(x,y,z):return x**2 * y**2 - x*y*z*32 +10
> minimize(f,[1,2,3],args=[2])
TypeError: f() takes exactly 3 arguments (2 given)