A Dimarts 06 Març 2007 14:25, Gabriel Beckers escrigué: > Hello, I am trying the new PyTables 2.0a2a (thanks!!!), and ran into the > (minor) problem that I can not select rows with a condition that > involves an UInt64Col. I get an error saying this is not possible, yet. > I can work around it (by defining the column using the signed variant), > but was wondering if this will be possible in the forseeable future, or > beyond that.
Well, this turns out to be a limitation of the numexpr package. Internally, numexpr uses a limited set of types for doing calculations, and unsigned ints are always upcasted to the immediate signed int that can fit the information. The problem here is that there is not a (standard) signed int that can be used to keep the information of an unsigned int64. In addition to this, you will probably know that Win32 doesn't define such an uint64 type, so supporting this in numexpr in a general way is not going to be easy in the future (unless Win64 or Vista have introduced the uint64 type, but still, we need several years until Win64/Vista will completely replace Win32). So, your best bet right now is to avoid UInt64 types if you can. If you absolutely need UInt64, the only way for doing selections with this is using regular python selections. For example, if your table has a 'colM' column which is declared as an UInt64Col, then you can still filter its values with: [row['colN'] for row in table if row['colM'] < X] However, this approach will generally lead to slow speed (specially on Win32 platforms, where the values will be converted to long python types). > All the best, and many thanks for making PyTables freely available, Well, it's not only freely available, it's also meant to be *free* (as in freedom ;) software. -- >0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-" ------------------------------------------------------------------------- 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 Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users