human
Complete this python program:
def line_search_armijo(f, xk, pk, gfk, old_fval, args=(), c1=0.0001, alpha0=1):
assistant
#Here is the Python program you requested.

    """Minimize over alpha, the function ``f(xk+alpha pk)``.
    Parameters
    f : callable
    Function to be minimized.
    xk : array_like
    Current point.
    pk : array_like
    Search direction.
    gfk : array_like
    Gradient of `f` at point `xk`.
    old_fval : float
    Value of `f` at point `xk`.
    args : tuple, optional
    Optional arguments.
    c1 : float, optional
    Value to control stopping criterion.
    alpha0 : scalar, optional
    Value of `alpha` at start of the optimization.
    Returns
    alpha
    f_count
    f_val_at_alpha
    Notes
    Uses the interpolation algorithm (Armijo backtracking) as suggested by
    Wright and Nocedal in \Numerical Optimization\, 1999, pg. 56-57
    """
    xk = np.atleast_1d(xk)
    fc = [0]
    def phi(alpha1):
        fc[0] += 1
        return f((xk + (alpha1 * pk)), *args)
    if (old_fval is None):
        phi0 = phi(0.0)
    else:
        phi0 = old_fval
    derphi0 = np.dot(gfk, pk)
    (alpha, phi1) = scalar_search_armijo(phi, phi0, derphi0, c1=c1, alpha0=alpha0)
    return (alpha, fc[0], phi1)