Re: reshape and keep x,y,z ordering

2016-06-07 Thread Heli
Thanks Michael, This did the trick. array.flatten('F') works exactly as I need. Thanks a lot, -- https://mail.python.org/mailman/listinfo/python-list

Re: reshape and keep x,y,z ordering

2016-06-07 Thread Michael Selik
s assumed that data follows x,y,z ordering. > and I use the following to reshape the numpy array. > > new_1d_array=np.reshape(3d.transpose(),(3d_nx*3d_ny*3d_nz,)) > > new_3d_array=np.reshape(1d,((3d_x,3d_y,3d_z)).transpose()) > > My question is if there is anyway that reshape wo

Re: reshape and keep x,y,z ordering

2016-06-07 Thread Joel Goldstick
cases it is assumed that data follows x,y,z ordering. > > and I use the following to reshape the numpy array. > > > new_1d_array=np.reshape(3d.transpose(),(3d_nx*3d_ny*3d_nz,)) > > > new_3d_array=np.reshape(1d,((3d_x,3d_y,3d_z)).transpose()) > > My question is if there is

reshape and keep x,y,z ordering

2016-06-07 Thread Heli
. new_1d_array=np.reshape(3d.transpose(),(3d_nx*3d_ny*3d_nz,)) new_3d_array=np.reshape(1d,((3d_x,3d_y,3d_z)).transpose()) My question is if there is anyway that reshape would keep x,y,z ordering that would not require transpose? and if there is a better more efficient way to do this? Thanks