Hi, I sort a file with 4 columns (x,y,z, somevalue) and I sort it using numpy.lexsort.
ind=np.lexsort((val,z,y,x)) myval=val[ind] myval is a 1d numpy array sorted by x,then y, then z and finally val. how can I reshape correctly myval so that I get a 3d numpy array maintaining the xyz ordering of the data? my val looks like the following: x,y,z, val 0,0,0,val1 0,0,1,val2 0,0,2,val3 ... Thanks a lot for your help, -- https://mail.python.org/mailman/listinfo/python-list