From: travlr <vel...@gm...> - 2005-09-07 11:45:52
|
Hi Fransesc, I hope you all had a very nice vaction :-) On 9/7/05, Francesc Altet <fa...@ca...> wrote: > Hi Travlr, >=20 > A Wednesday 07 September 2005 09:32, travlr va escriure: > > Today, I went back and got the "selecting and getting" Table <rows> and > > Column <elements> for versions 1.0 and 1.1 working again, The attachmen= ts > > provided are a tables.Table.dif file for each version. > > Below is an example of it's usage. >=20 > Thanks for the patches. I think is a good idea to allow retrieving > values using an index array. I'll apply the patches and hopefully they > will appear in the forthcoming PyTables 1.2. I hope you're also able to include setting values (and other functionality mentioned) as well. I was able to implement "setting" initially, but was not able to reproduce it with these patches. >=20 > > Also Fransesc, two questions: > > 1) Could the tables.Table.Column also have an .nrows (nelements) attrib= ute? >=20 > Well, you have access to the table object via the .table attribute. So > you can use columnObject.table.nrows. >=20 > > 2) Once bounded, tables.Table used to return as a <class > > 'numarray.records.RecArray'> object. Now it returns a <class > > 'tables.nestedrecords.NestedRecArray'> object....Is this necessary?. >=20 > Strictly speaking no, but from PyTables 1.1 on, Table objects supports > nested fields, so we have been forced to introduce such a > NestedRecArray object. This is by not means a brand new object, but it > is strongly based on RecArray (in fact, it inherits from RecArray). > If, for whatever reason, you prefer a RecArray object, you have a > couple of possibilities: >=20 > 1.- Use asRecArray() method. See: > http://pytables.sourceforge.net/html-doc/usersguide8.html#sectionB.2 > for more details. >=20 > 2.- If your table has not nested fields, your NestedRecArray will be > flat, and you can access the underlying RecArray object by just > getting the object pointed by the ._flatArray attribute. Actually, I really don't have a direct concern about this. I wish my understandings (and free time) were greater, because I'd like to offer what I can. In the near future my time will be more free, and maybe I can at least do a little something with an improvement of the documentation... I would have loved to have had an hyperlinked index back when I was familiarizing myself with pyTables. When I finish with my immediate responsibilities, I will offer again. Thanks Pete > Cheers, >=20 > -- > >0,0< Francesc Altet http://www.carabos.com/ > V V C=E1rabos Coop. V. Enjoy Data > "-" >=20 > |