def _linesearch_powell(func, p, xi, tol=<NUM_LIT>):
def myfunc(alpha):<EOL><INDENT>return func(p + alpha*xi)<EOL><DEDENT>alpha_min, fret, iter, num = brent(myfunc, full_output=<NUM_LIT:1>, tol=tol)<EOL>xi = alpha_min*xi<EOL>return squeeze(fret), p + xi, xi<EOL>
Line-search algorithm using fminbound.

    Find the minimium of the function ``func(x0+ alpha*direc)``.