parameters: (f, xk, pk, gfk, old_fval, args=(), c1=1e-4, alpha0=1)
return_statement: return alpha, fc[0], phi1
docstring: 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
docstring_summary: Minimize over alpha, the function ``f(xk+alpha pk)``.
docstring_tokens: Minimize over alpha the function f ( xk + alpha pk ) .
function: def line_search_armijo(f, xk, pk, gfk, old_fval, args=(), c1=1e-4, alpha0=1):
      """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.)
      else:
          phi0 = old_fval  # compute f(xk) -- done in past loop
  
      derphi0 = np.dot(gfk, pk)
      alpha, phi1 = scalar_search_armijo(phi, phi0, derphi0, c1=c1,
                                         alpha0=alpha0)
      return alpha, fc[0], phi1
function_tokens: def line_search_armijo ( f , xk , pk , gfk , old_fval , args = ( ) , c1 = 1e-4 , alpha0 = 1 ) : 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. ) else : phi0 = old_fval # compute f(xk) -- done in past loop derphi0 = np . dot ( gfk , pk ) alpha , phi1 = scalar_search_armijo ( phi , phi0 , derphi0 , c1 = c1 , alpha0 = alpha0 ) return alpha , fc [ 0 ] , phi1