Hi everyone,
I've just started using the Pytables2.0 beta, and am very impressed,
especially with the complex where clauses possible using numexpr.
I have hit one stumbling block in one of my tables, though: selecting on
a uint8 column. This fails with:
<type 'exceptions.NotImplementedError'>: variable ``N_ACCT`` refers to
a 64-bit unsigned integer column,
not yet supported in conditions, sorry; please use regular Python
selections
WARNING: Failure executing file: <RBPresults.py>
Maybe this has been/will be fixed in a newer version of numexpr.
If not, maybe PyTables could pretend that uint8 columns are actually
8-character strings using a numpy ndarray.view('S8')? These sort in the
same order (if a bit more slowly). Then everything should be OK
providing the expressions are simple equality/inequality comparisons.
Then I could alter my code from:
where_str = '((C_PROD=="%s")&(N_ACCT>=%d)&(N_ACCT<=%d))' %
(logo, acct_min, acct_max)
to
where_str = '((C_PROD=="%s")&(N_ACCT>="%d")&(N_ACCT<="%d"))' %
(logo, acct_min, acct_max)
Cheers
Stephen
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Pytables-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pytables-users