def _line_search_wolfe12(f, fprime, xk, pk, gfk, old_fval, old_old_fval, **kwargs):
 ret = line_search_wolfe1(f, fprime, xk, pk, gfk, old_fval, old_old_fval, **kwargs)
 if (ret[0] is None):
  ret = line_search_wolfe2(f, fprime, xk, pk, gfk, old_fval, old_old_fval, **kwargs)
 if (ret[0] is None):
  raise _LineSearchError()
 return ret

def _line_search_wolfe12 ( f , fprime , xk , pk , gfk , old_fval , old_old_fval , ** kwargs ) : ret = line_search_wolfe1 ( f , fprime , xk , pk , gfk , old_fval , old_old_fval , ** kwargs ) if ( ret [ 0 ] is None ) : ret = line_search_wolfe2 ( f , fprime , xk , pk , gfk , old_fval , old_old_fval , ** kwargs ) if ( ret [ 0 ] is None ) : raise _LineSearchError ( ) return ret
same as line_search_wolfe1 .