[SciPy-User] accessing a set of columns from a recarray

Vincent Davis vincent@vincentdavis....
Sun Mar 21 20:52:20 CDT 2010

I have a few things I am trying to understand.
I have a record array and and I list of columns for which I would like to
get the row means. My current solution is to iterate though my list of
column names and make a new "normal" array. I would like to do something
like np.mean(A['x','y','z'])
It would be great to append the results as an additional column to the
array, but I think I have seen how to do this.

Next, to make it a little more interesting I have a column that has values
0-14. I would like to get the mean of a row conditional on the value of this
column. Ideally I get a new array with columns 0-14 with missing values
where needed.

I hope this is clear, please ask for clarification if not.

  *Vincent Davis
720-301-3003 *
 my blog <http://vincentdavis.net> |
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20100321/bda896ee/attachment.html 

More information about the SciPy-User mailing list