Apply a Row major Order for a set of 3D data
<p>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]]</p>

<p>So I tried to do the following To read these data in row major order:</p>

<pre><code>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() 
</code></pre>

<p>Obviousely from the data result that this is not the answer.
Any help Would be Appreciated</p>
