[Numpy-discussion] Record arrays

Dan Yamins dyamins at gmail.com
Thu Jun 26 16:39:25 EDT 2008


>
> In [12]: r2.foo
> Out[12]: array([1, 1, 1])
>
>
> One downside of this is that the attribute access feature slows down
> all field accesses, even the r['foo'] form, because it sticks a bunch
> of pure Python code in the middle. Much code won't notice this, but if
> you end up having to iterate over an array of records (as I have),
> this will be a hotspot for you.
>
> Record arrays are fundamentally a part of numpy, and no one is even
> suggesting that they would go away. No one is seriously suggesting
> that we should remove recarray, but some of us hesitate to recommend
> its use over plain record arrays.
>
> Does that clarify the discussion for you?




Yes, thanks very much, this is very helpful.  (I think I was confused by the
fact that, AFAICT, the Guide to Numpy only mentions recarray -- as distinct
from Record arrays -- in one somewhat cryptic line.)   But I guess that the
numpy documentation work going on now will provide good documentation for
using Record Arrays proper?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080626/7b8a2114/attachment.html>


More information about the NumPy-Discussion mailing list