title: scipy.optimize for vector function
body: <p>I want to minimize a function which has multiple inputs but also multible outputs. More specific, I call an Excel calculation and want to constrain particular inputs and outputs of the function. So far I just managed to minimize the scalar function meaning multible inputs but just one output. Can anyone please guide me if such a problem can be solved by Python/Scipy?  I´d like to choose x so that smpkt is minimized and A is smaller than a particular value. </p>
  
  <p>For example some code snippets: </p>
  
  <pre><code>def f1(x,params):
      y=F(x)
  </code></pre>
  
  <p>The function <code>F(x)</code> is an external Excel sheet with multiple inputs and outputs, the output should be y=[smpkt,A]. Now i´d like to minimize <code>smpkt</code> and keep <code>A</code> smaller than my constraint by choosing <code>x</code>. </p>
  
  <p>So far I managed to minimize <code>y=F(x)</code>  y=[smpkt] as scalar by the following call:</p>
  
  <pre><code>res = optimize.minimize(f1, x0, args=params, method='COBYLA',options={'ftol': 0.1, 'maxiter': 5})
  </code></pre>
  
  <p>Any idea?</p>