2 from scipy.stats
import linregress
5 data = genfromtxt(
'ammonia.dat')
6 temp = data[:,0] + 273.15
8 a, b, r, p, e = linregress(temp, hfv)
9 print 'cpv = %.2f kJ/kg' % a
12 a, b, r, p, e = linregress(temp, hfl)
13 print 'cpl = %.2f kJ/kg' % a
16 a, b, r, p, e = linregress(temp, hfv - hfl)
17 print 'delta_cp = %.2f kJ/kg' % -a
18 print 'mu = %.2f kJ/kg' % b