title: Python curve_fit with multiple independent variables
body: <p>Python's <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.curve_fit.html" rel="noreferrer"><code>curve_fit</code></a> calculates the best-fit parameters for a function with a single independent variable, but is there a way, using <code>curve_fit</code> or something else, to fit for a function with multiple independent variables? For example:</p>
  
  <pre><code>def func(x, y, a, b, c):
      return log(a) + b*log(x) + c*log(y)
  </code></pre>
  
  <p>where x and y are the independent variable and we would like to fit for a, b, and c.</p>