Thanks for your replies. Let me explain my problem a little bit more. I have
the following data which i read from a file using numpy.loadtxt and then i sort
it using np.lexsort:
x=f[:,0] # XColumn
y=f[:,1] # YColumn
z=f[:,2] # ZColumn
val=f[:,3] # Val Column
xcoord=np.sort(np.unique(f[:,0])) # X
On Tue, 26 Jul 2016 07:10:18 -0700, Heli wrote:
> 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 my
Heli wrote:
> 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
>
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 orderi