From: Francesc A. <fa...@ca...> - 2005-09-26 19:12:57
|
A Dilluns 26 Setembre 2005 20:50, Stefan Kuzminski va escriure: > Once I calculate an index ( not a specific pytables index, just a > vector of row numbers ) that is the new order that the table has to be > in, I tried to just random access the source table, but that was slow.. > > for idx in new_order: > new_table.append( src_table[idx] ) > > I wonder if I should try this approach but in a column oriented way? > Is there a way to pass to pytables the order that you want the data > returned? Yes, there is. Try: new_table.append( src_table.readCoordinates(new_order) ) In the future, one should be able to do: new_table.append( src_table[new_order] ) as well :-) I'm not sure, but you may need to try with 1.2bx accessible in: http://www.carabos.com/downloads/pytables/preliminary/ in order to make readCoordinates to work well (although 1.1.1 should work fine, I believe) Cheers, =2D-=20 >0,0< Francesc Altet =A0 =A0 http://www.carabos.com/ V V C=E1rabos Coop. V. =A0=A0Enjoy Data "-" |