From: Francesc A. <fa...@ca...> - 2005-09-07 09:35:13
|
Hi Travlr, 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 attachments > provided are a tables.Table.dif file for each version. > Below is an example of it's usage. 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. > Also Fransesc, two questions: > 1) Could the tables.Table.Column also have an .nrows (nelements) attribut= e? Well, you have access to the table object via the .table attribute. So you can use columnObject.table.nrows. > 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?. 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: 1.- Use asRecArray() method. See: http://pytables.sourceforge.net/html-doc/usersguide8.html#sectionB.2 for more details. 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. Cheers, =2D-=20 >0,0< Francesc Altet =A0 =A0 http://www.carabos.com/ V V C=E1rabos Coop. V. =A0=A0Enjoy Data "-" |