title: Use python fsolve for solving equations with 2-D input variables
body: <p>By knowing that fsolve function can be easily applied using the following method:</p>
  <pre><code>import numpy as np
  from scipy.optimize import fsolve
  def solve(var):
      x = var[0]
      y = var[1]
      
      f = np.zeros(2)
      f[0] = x+y-a
      f[1] = 3*x+7*y-10
      return f
  a = 2
  var = fsolve(solve, np.zeros(2))
  print(var)
  </code></pre>
  <p>BUT, how can I use fsolve function if <code>a</code> be a 2-D matrix like the following code (in comparison of the above code, just <code>a</code> has changed):</p>
  <pre><code>import numpy as np
  from scipy.optimize import fsolve
  def solve(var):
      x = var[0]
      y = var[1]
      
      f = np.zeros(2)
      f[0] = x+y-a
      f[1] = 3*x+7*y-10
      return f
  a = np.array([[1,2], [3, 4]])
  var = fsolve(solve, np.zeros(2))
  print(var)
  </code></pre>
  <p><strong>Edit:</strong></p>
  <p>What I want can be calculated using the following method. But is it possible to do it without using the <code>for</code> loops? (maybe if we define the <code>var[0,:]</code> and <code>var[1,:]</code> instead of <code>var[0]</code> and <code>var[1]</code>, the problem would be solved)</p>
  <pre><code>import numpy as np
  from scipy.optimize import fsolve
  def solve(var):
      x = var[0]
      y = var[1]
      
      f = np.zeros(2)
      f[0] = x+y-a
      f[1] = 3*x+7*y-10
      return f
  a1 = np.array([[1,2], [3,4]])
  for a2 in a1:
      for a3 in a2:
          a=a3
          var = fsolve(solve, np.zeros(2))
          print(var)
  </code></pre>