def tpv(thermo): thermo['pActual'] = thermo['Pressure'] T0 = ideal.tpv(thermo) thermtuple = 'LK tpv',thermo #print (thermtuple, type(thermtuple)) T = scipy.optimize.newton(tfpv, T0, None, thermtuple) return T