parameters: (self, rho, p)
return_statement: return T
docstring: Temperature as a function of density (rho) and pressure (p)
docstring_summary: Temperature as a function of density (rho) and pressure (p)
docstring_tokens: Temperature as a function of density ( rho ) and pressure ( p )
function: def _T_of_rho_p(self, rho, p):
          """Temperature as a function of density (rho) and pressure (p)"""
          t1 = p / rho * (1. + sys.float_info.epsilon)  # initial guess
  
          def f(y):  # function to find root of
              return self.p_of_rho_T(rho, y) / p - 1.
  
          try:
              T, r = brentq(f, .1 * t1, t1, **brent_opt)  # find root
          except ValueError:
              T, r = brentq(f, .05 * t1, 2 * t1, **brent_opt)
          if not r.converged:
              raise RuntimeError('Unable to converge on temperature.')
          return T
function_tokens: def _T_of_rho_p ( self , rho , p ) : t1 = p / rho * ( 1. + sys . float_info . epsilon ) # initial guess def f ( y ) : # function to find root of return self . p_of_rho_T ( rho , y ) / p - 1. try : T , r = brentq ( f , .1 * t1 , t1 , * * brent_opt ) # find root except ValueError : T , r = brentq ( f , .05 * t1 , 2 * t1 , * * brent_opt ) if not r . converged : raise RuntimeError ( 'Unable to converge on temperature.' ) return T