def fminbound(func, x1, x2, args=(), xtol=1e-05, maxfun=500, full_output=0, disp=1):
 options = {'xatol': xtol, 'maxiter': maxfun, 'disp': disp}
 res = _minimize_scalar_bounded(func, (x1, x2), args, **options)
 if full_output:
  return (res['x'], res['fun'], res['status'], res['nfev'])
 else:
  return res['x']

def fminbound ( func , x1 , x2 , args = ( ) , xtol = 1e-05 , maxfun = 500 , full_output = 0 , disp = 1 ) : options = { 'xatol' : xtol , 'maxiter' : maxfun , 'disp' : disp } res = _minimize_scalar_bounded ( func , ( x1 , x2 ) , args , ** options ) if full_output : return ( res [ 'x' ] , res [ 'fun' ] , res [ 'status' ] , res [ 'nfev' ] ) else : return res [ 'x' ]
bounded minimization for scalar functions .