Send parameters to a user-defined function?
<p>We define a user-defined function as follows.</p>

<pre><code>def testfun(x):
    return( x[0]*a+x[1]*b)
</code></pre>

<p>Call the function:</p>

<pre><code>sol =  optimize.root(testfun, [0, 0], method = 'lm')
</code></pre>

<p>How can we pass <code>a</code> and <code>b</code> when calling the function ?</p>