title: How Do I put 2 matrix into scipy.optimize.minimize?
body: <p>I work with the <code>scipy.optimize.minimize</code> function.
  My purpose is get <code>w,z</code> which minimize <code>f(w,z)</code></p>
  
  <p>Both <code>w</code> and <code>z</code> are <em>n</em> by <em>m</em> matrices:</p>
  
  <pre><code>[[1,1,1,1],
   [2,2,2,2]]
  </code></pre>
  
  <p>f(w,z) is receive parameter w and z.</p>
  
  <p>I already tried the form given below:</p>
  
  <pre><code>def f(x):
     w = x[0]
     z = x[1]
     ...
  
  minimize(f, [w,z])
  </code></pre>
  
  <p>but, minimize does not work well.</p>
  
  <p>What is the valid form to put two matrices (<em>n</em> by <em>m</em>) into <code>scipy.optimize.minimize</code>?</p>