input: from scipy.optimize import minimize 
  
  def obj_func(x):
      """ Objective function for optimization.
      >>> obj_func([1, 2, 3])
      6
      """
      return sum(x)
  
  def optimize(): 
      """ Optimize the given objective function using the Nelder-Mead method.
      >>> optimize()
      array([0.0000000e+00, 0.0000000e+00, 0.0000000e+00])
      """
      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())
output:     x0 = [0.0, 0.0, 0.0] 
      res = minimize(obj_func, x0, method='nelder-mead', options={'xtol': 1e-8, 'disp': True}) 
      return res.x