import numpy as np import itertools # A small data set #T_in = np.array([20,24,35,40])+273.15 #x_in = np.array([47,55,70,78,82])/100.0 #rho_in = np.array([[1047,1033,1020,1000,990],[997,983,970,950,940],[947,933,920,900,895],[987,883,870,850,845]]) # # large data set T_in = np.array([ -45 , -40 , -35 , -30 , -25 , -20 , -15 , -10])+273.15 # Kelvin x_in = np.array([ 5 , 10 , 15 , 20 , 25 , 30 , 35 ])/100.0 # mass fraction rho_in = np.array([ [1064.0, 1054.6, 1045.3, 1036.3, 1027.4, 1018.6, 1010.0], [1061.3, 1052.1, 1043.1, 1034.3, 1025.6, 1017.0, 1008.6], [1057.6, 1048.8, 1040.1, 1031.5, 1023.1, 1014.8, 1006.7], [1053.1, 1044.6, 1036.2, 1028.0, 1019.9, 1012.0, 1004.1], [1047.5, 1039.4, 1031.5, 1023.7, 1016.0, 1008.4, 1000.9], [1040.7, 1033.2, 1025.7, 1018.4, 1011.2, 1004.0, 997.0], [1032.3, 1025.3, 1018.5, 1011.7, 1005.1, 998.5, 992.0], [1021.5, 1015.3, 1009.2, 1003.1, 997.1, 991.2, 985.4]]) # kg/m3 def getCoeffs1d(x,z,order): if (len(x)