[Numpy-discussion] Slicing and structured arrays question

Hanno Klemm klemm@phys.ethz...
Tue Jan 27 06:24:38 CST 2009

I have the following question, that I could not find an answer to in the
example list, or by googling:

I have a record array with dtype such as:
dtype([('times', '<f8'), ('sensors', '|S8'), ('prop1', '<f8'), ('prop2',
'<f8'), ('prop3', '<f8'), ('prop4', '<f8')])

I would now like to calculate the mean and median for each of the
properties 'props'. Is there a way to do this similarly to a conventional
array with


or do I have to use a loop over the names of the properties? 

Thanks in advance,

Hanno Klemm

More information about the Numpy-discussion mailing list