parameters: (a, fa, fpa, b, fb)
return_statement: return xmin
docstring: Finds the minimizer for a quadratic polynomial that goes through
      the points (a,fa), (b,fb) with derivative at a of fpa,
docstring_summary: Finds the minimizer for a quadratic polynomial that goes through
      the points (a,fa), (b,fb) with derivative at a of fpa,
docstring_tokens: Finds the minimizer for a quadratic polynomial that goes through the points ( a fa ) ( b fb ) with derivative at a of fpa
function: def _quadmin(a, fa, fpa, b, fb):
      """
      Finds the minimizer for a quadratic polynomial that goes through
      the points (a,fa), (b,fb) with derivative at a of fpa,
  
      """
      # f(x) = B*(x-a)^2 + C*(x-a) + D
      with np.errstate(divide='raise', over='raise', invalid='raise'):
          try:
              D = fa
              C = fpa
              db = b - a * 1.0
              B = (fb - D - C * db) / (db * db)
              xmin = a - C / (2.0 * B)
          except ArithmeticError:
              return None
      if not np.isfinite(xmin):
          return None
      return xmin
function_tokens: def _quadmin ( a , fa , fpa , b , fb ) : # f(x) = B*(x-a)^2 + C*(x-a) + D with np . errstate ( divide = 'raise' , over = 'raise' , invalid = 'raise' ) : try : D = fa C = fpa db = b - a * 1.0 B = ( fb - D - C * db ) / ( db * db ) xmin = a - C / ( 2.0 * B ) except ArithmeticError : return None if not np . isfinite ( xmin ) : return None return xmin