parameters: (lb, ub, n)
return_statement: return list(zip(lb, ub))
docstring: Convert the new bounds representation to the old one.
  
      The new representation is a tuple (lb, ub) and the old one is a list
      containing n tuples, i-th containing lower and upper bound on a i-th
      variable.
docstring_summary: Convert the new bounds representation to the old one.
docstring_tokens: Convert the new bounds representation to the old one .
function: def new_bounds_to_old(lb, ub, n):
      """Convert the new bounds representation to the old one.
  
      The new representation is a tuple (lb, ub) and the old one is a list
      containing n tuples, i-th containing lower and upper bound on a i-th
      variable.
      """
      lb = np.asarray(lb)
      ub = np.asarray(ub)
      if lb.ndim == 0:
          lb = np.resize(lb, n)
      if ub.ndim == 0:
          ub = np.resize(ub, n)
  
      lb = [x if x > -np.inf else None for x in lb]
      ub = [x if x < np.inf else None for x in ub]
  
      return list(zip(lb, ub))
function_tokens: def new_bounds_to_old ( lb , ub , n ) : lb = np . asarray ( lb ) ub = np . asarray ( ub ) if lb . ndim == 0 : lb = np . resize ( lb , n ) if ub . ndim == 0 : ub = np . resize ( ub , n ) lb = [ x if x > - np . inf else None for x in lb ] ub = [ x if x < np . inf else None for x in ub ] return list ( zip ( lb , ub ) )