title: Python scipy optimize fmin from matlab fminsearch error
body: <p>I am converting this matlab function handle to python and am receiving this error (ValueError: setting an array element with a sequence.) in python. I'm pretty new to python sorry if there is an obvious error.</p>
  
  <p>In matlab:</p>
  
  <pre><code>P = [1 1; 6 1; 6 5]
  fh = @(x) sqrt(sum((ones(3,1)*x - P).^2, 2))
  [x,fval] = fminsearch(@(x) max(fh(x)),[0 0])
  </code></pre>
  
  <p>In python:</p>
  
  <pre><code>P = np.matrix([[1, 1],[ 6, 1],[ 6, 5]])
  fh = lambda x:np.sqrt(sum(np.power((np.ones((3,1))*x - P),2),axis = 0))
  xopt = scipy.optimize.fmin(func=fh,x0 = np.matrix([0, 0]))
  </code></pre>
  
  <p>The code works in matlab but not in python thanks.</p>