1 2 3 4 5 6 7 8 9 10 11 12
__author__ = 'kaurov' import numpy as np import scipy.interpolate as interp loc = '/home/kaurov/Downloads/' T_list = np.loadtxt(loc+'Temperaturevalues.dat') Rho_list = np.loadtxt(loc+'Densityvalues.dat') C_table = np.loadtxt(loc+'tableC.dat') C_interp = interp.RectBivariateSpline(T_list, Rho_list[:-1], C_table[:,:-1]) C_interp(1e8,1e12)
You can clone a snippet to your computer for local editing. Learn more.