A Wednesday 09 June 2010 21:35:44 German Ocampo escrigué:
> Francesc
> 
> Many thanks for your quick answer, I made a test without Psyco and it
> works, but the problem that I have, psyco is a vital part of my
> project.
> 
> I run the same test, but iterating over all the rows and I making
> inside the loop an explicit condition and it works with psyco

So, if you need psyco, then why not use the explicit condition venue?

> Are there some alternative way to iterate over some rows in a table
> that satisface a condition and the posibility of modify the table
> values?

The one that you show us is the most powerful for single loops that I can 
think of.  Another option would be to retrieve large chunks of rows out of 
your table (for example, using Table.read()); you will get a NumPy structured 
array.  Then update the necessary fields in the structured array.  Finally 
update the table on disk from these modified NumPy arrays (using 
Table.modifyRows(), for example).

I don't know if the above procedure would work with psyco and if it would be 
faster than what are you doing now, but it is worth a try.

-- 
Francesc Alted

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users

Reply via email to