Re: [Numpy-discussion] [numpy-discussion] Transform 3d data

2010-10-25 Thread Thomas Königstein
Wow, thanks a million, this worked just fine and I think I understood at least parts of the method :) Cheers Thomas * On Tue, 2010-10-19 at 14:20 +0200, Nadav Horesh wrote: > Of course there is an (at least one) error: * > the line should be: > > XYZ = > np.mgrid[lwrbnd[0]:uprbnd[0]:shap

Re: [Numpy-discussion] [numpy-discussion] Transform 3d data

2010-10-19 Thread Nadav Horesh
> np.savetxt(np.hstack((XYZ.reshape(3,-1).T, vectors))) > > > Nadav > > > > -Original Message- > From: numpy-discussion-boun...@scipy.org on behalf of Thomas > Königstein > Sent: Tue 19-Oct-10 12:05 > To: numpy-discussion@scipy.org > S

Re: [Numpy-discussion] [numpy-discussion] Transform 3d data

2010-10-19 Thread Nadav Horesh
= fields.reshape(-1,3) np.savetxt(np.hstack((XYZ.reshape(3,-1).T, vectors))) Nadav -Original Message- From: numpy-discussion-boun...@scipy.org on behalf of Thomas Königstein Sent: Tue 19-Oct-10 12:05 To: numpy-discussion@scipy.org Subject: [Numpy-discussion] [numpy-discussion] Transform 3d

[Numpy-discussion] [numpy-discussion] Transform 3d data

2010-10-19 Thread Thomas Königstein
Hello everyone, I have the following problem: I acquire a (evenly spaced) 3d field of 3d vectors from a HDF5 data file: >>> import tables >>> field=tables.openFile("test.h5").root.YeeMagField.read() now, the data is organized in "nested arrays"... so, when I have, say, 300 data points on the x-