Well I am stuck on a problem, where I need to write a set of data file in row major order. The data are 3D concentration points so to say in x, y and z and they are all computed into:
Pac = [Pac[0], Pac[1], Pac[2]]
So I tried to do the following To read these data in row major order:
fp = open('pac_data.dat' , 'w')
for iz in range(pac.shape[2]):
for iy in range(pac.shape[1]):
for ix in range(pac.shape[0]):
fp.write(str(pac[ix,iy,iz])+'\t')
fp.write("\n")
fp.write("\n")
fp.close()
Obviousely from the data result that this is not the answer.
Any help Would be Appreciated
Actually what stated above works… if you have data in x, y, and z this works if one wants to arrange the data in row major order