[Numpy-discussion] PyTables, array and recarray
Pierre GM
pgmdevlist at gmail.com
Mon Jun 2 09:08:53 EDT 2008
On Monday 02 June 2008 08:03:15 Hanno Klemm wrote:
> thanks for your replies, the view works fine. The reason why I like
> recarrays is that you can address your fields simply with a.Name, when
> a is your array. I find that highly convenient when working with data
> interactively.
>
> As far as I know there is no similar possbility to do that with
> ndarrays, or is there?
No, but you can access the field Name of your ndarray a with a['Name'], which
is just as convenient. An issue with recarrays is that the __getattribute__
and __setattr__ methods are overwritten, which tends to reduce performance.
More information about the NumPy-Discussion
mailing list