input: 
  from scipy.optimize import minimize 
  
  def obj_func(x):
      """ Objective function to optimize """
      y = (x[0] - 1) ** 2 + (x[1] - 2.5) ** 2
      return y
  
  def optimize(): 
      """ Set up optimization problem using scipy.optimize.minimize """
      x0 = [0.0, 0.0, 0.0] 
      res = minimize(obj_func, x0, method='nelder-mead', options={'xtol': 1e-8, 'disp': True}) 
      return res.x
  
  # Example usage
  print(optimize())
  # Output: [1.         2.50000001 0.        ]
  
output:     x0 = [0.0, 0.0] 
      res = minimize(obj_func, x0, method='nelder-mead', options={'xtol': 1e-8, 'disp': True}) 
      return res.x