input: 
  from scipy.optimize import minimize
  
  def optimize(obj_func):
      """ Write a python program to optimize the given objective function using the 
      Nelder-Mead method.
      >>> def obj_func(x): return (x[0] - 1)**2 + (x[1] - 2.5)**2
      >>> optimize(obj_func)
      [1.0, 2.5]
      """
      x0 = [0.0, 0.0, 0.0]
      res = minimize(obj_func, x0, method='nelder-mead', options={'xtol': 1e-8, 'disp': True})
      return res.x
  
  print(optimize(lambda x: (x[0] - 1)**2 + (x[1] - 2.5)**2))
  
output:     x0 = [0.0, 0.0]
      res = minimize(obj_func, x0, method='nelder-mead', options={'xtol': 1e-8, 'disp': True})
      return res.x.tolist()