[SciPy-User] Optimization on the subspace of a domain

Daπid davidmenhur at gmail.com
Fri Aug 23 16:58:44 EDT 2013


On 23 August 2013 22:49, Cy. T. <dragontse at hotmail.com> wrote:
> It would work if I define a new function: f(x,y,z_0) = h(x,y) for a given
> z_0, but I wonder if there is an option for doing that without defining
> another function.

A lambda function will do the trick avoiding having to give it a new name:

minimize(lambda x, y: f(x, y, z0), ...)

This only works for very simple subdomains of the function, though.



David.



More information about the SciPy-User mailing list