Re: [Numpy-discussion] dumb structured arrays question

2009-09-17 Thread David Warde-Farley
On 17-Sep-09, at 6:18 PM, Erin Sheldon wrote: > > You can just view it differently: > > In [4]: x=numpy.zeros(3,dtype=[('field1','S5'),('field2','f4'), > ('field3','f4'),('field4','f4')]) > > In [5]: x > Out[5]: > array([('', 0.0, 0.0, 0.0), ('', 0.0, 0.0, 0.0), ('', 0.0, 0.0, 0.0)], > dtype

Re: [Numpy-discussion] dumb structured arrays question

2009-09-17 Thread Erin Sheldon
On Thu, Sep 17, 2009 at 6:12 PM, David Warde-Farley wrote: > If I have a 1-dimensional array with a structured dtype, say str, > float, float, float, float where all the float columns have their > own names, and I just want to extract all the floats in the order they > appear into a 2D matrix

[Numpy-discussion] dumb structured arrays question

2009-09-17 Thread David Warde-Farley
If I have a 1-dimensional array with a structured dtype, say str, float, float, float, float where all the float columns have their own names, and I just want to extract all the floats in the order they appear into a 2D matrix that disregards the dtype metadata... Is there an easy way t