title: Finding the root of a multivariate function at different variable values with Python
body: <p>I a have a function of two variables and need to find the root of this function for a large number of different values for the other variable. What is the best way of doing this?</p>
  
  <p>I can do it with loops, but I assume that there is a much better way of going about it.</p>
  
  <pre><code>import scipy as sp
  def g(y,x):
      return x**2+y
  for i in range(1000):
      sp.optimize.fsolve(g,0,i)
  </code></pre>