title: how to extract value from a numpy.ndarray
body: <p>I'm using Scipy.Optimize.fmin to find the maximum of a function. The output is in the form of a numpy.ndarray with additional information on the process. I need just the x value returned as a float.</p>
  
  <pre><code>def f(x):
      """returns the value of f(x) with the input value x"""
      import math
      f = math.exp(-x ** 2.0) / (1.0 + x ** 2.0) + \
          2.0 * (math.cos(x) ** 2.0) / (1.0 + (x - 4.0) ** 2.0)
      return f
  
  def find_max_f():
      """returns the x for which f(x) takes the maximum value"""
      import scipy.optimize as o
      m = o.fmin(lambda x: -f(x), 0)
      return m
  </code></pre>
  
  <p>This is what it returns:</p>
  
  <pre><code>&gt;&gt;&gt; find_max_f()
  Optimization terminated successfully.
       Current function value: -1.118012
       Iterations: 12
       Function evaluations: 24
  array([ 0.0131875])
  </code></pre>
  
  <p>I just need the final number inside the brackets labeled array</p>