parameters: (self, rho, h)
return_statement: return T
docstring: Temperature as a function of density (rho) and specific enthalpy (h)
docstring_summary: Temperature as a function of density (rho) and specific enthalpy (h)
docstring_tokens: Temperature as a function of density ( rho ) and specific enthalpy ( h )
function: def _T_of_rho_h(self, rho, h):
          """Temperature as a function of density (rho) and specific enthalpy (h)"""
          t1 = .4 * h * (1. + sys.float_info.epsilon)
  
          def f(y):
              return (self.p_of_rho_T(rho, y) + self.ei_of_rho_T(rho, y)) / (h * rho) - 1.
  
          T, r = brentq(f, .1 * t1, t1, **brent_opt)
          if not r.converged:
              raise RuntimeError('Unable to converge on temperature.')
          return T
function_tokens: def _T_of_rho_h ( self , rho , h ) : t1 = .4 * h * ( 1. + sys . float_info . epsilon ) def f ( y ) : return ( self . p_of_rho_T ( rho , y ) + self . ei_of_rho_T ( rho , y ) ) / ( h * rho ) - 1. T , r = brentq ( f , .1 * t1 , t1 , * * brent_opt ) if not r . converged : raise RuntimeError ( 'Unable to converge on temperature.' ) return T