Re: [Numpy-discussion] From float to records

2008-05-29 Thread Pierre GM
On Thursday 29 May 2008 16:25:24 Charles R Harris wrote: > > * Could somebody explain me what goes wrong in the second case > > (transpose+view) ? Is it because the transpose doesn't own the data ? > > > > * Is there a way to transform my (3,5) array into a (5,) recordarray > > without a > > copy ?

Re: [Numpy-discussion] From float to records

2008-05-29 Thread Charles R Harris
On Thu, May 29, 2008 at 2:05 PM, Pierre GM <[EMAIL PROTECTED]> wrote: > All, > I have a set of arrays that I want to transform to records. Viewing them as > a > new dtype is usually sufficient, but fails occasionally. Here's an example: > > #--- > import numpy a

[Numpy-discussion] From float to records

2008-05-29 Thread Pierre GM
All, I have a set of arrays that I want to transform to records. Viewing them as a new dtype is usually sufficient, but fails occasionally. Here's an example: #--- import numpy as np testdtype = [('a',float),('b',float),('c',float)] test = np.random.rand(15).re