title: Scipy, optimize a function with argument dependent constraints
body: <p>I am trying to use negative of <code>scipy.optimize.minimize</code> to maximize a function <code>f (a, b, c, d)</code>. <code>d</code> is a <code>numpy.array</code> of guess variables.</p>
  
  <p>I am trying to put some bounds on each <code>d</code>. And also a constraint on each <code>d</code> such that <code>(d1 * a1 + d2 * a2 + ... + d3 * a3) &lt; some_Value</code> (<code>a</code> being the other argument to the subject function <code>f</code>).</p>
  
  <p>My problem is how do I define this constraint as an argument to the maximize function.</p>
  
  <p>I could not find any <code>maximize</code> function in the library so we're using the negative of <code>minimize</code> with <code>minimize</code> documentation over <a href="http://docs.scipy.org/doc/scipy-0.15.1/reference/generated/scipy.optimize.minimize.html" rel="noreferrer">here</a>.</p>
  
  <p>Please consider asking for clarifications if the question is not clear enough.</p>