[Numpy-discussion] Int64 and string support for numexpr

Ivan Vilata i Balaguer ivilata at carabos.com
Tue Aug 1 11:02:01 CDT 2006


Hi all,

I'm attaching some patches that enable the current version of numexpr
(r2142) to:

1. Handle int64 integers in addition to int32 (constants, variables and
   arrays).  Python int objects are considered int32 if they fit in 32
   bits.  Python long objects and int objects that don't fit in 32 bits
   (for 64-bit platforms) are considered int64.

2. Handle string constants, variables and arrays (not Unicode), with
   support for comparison operators (==, !=, <, <=, >=, >).  (This
   brings the old ``memsizes`` variable back.)  String temporaries
   (necessary for other kinds of operations) are not supported.

The patches also include test cases and some minor corrections (e.g.
removing odd carriage returns in some lines in compile.py).  There are
three patches to ease their individual review:

* numexpr-int64.diff only contains the changes for int64 support.
* numexpr-str.diff only contains the changes for string support.
* numexpr-int64str.diff contains all changes.

The task has been somehow difficult, but I think the result fits quite
well in numexpr.  So, what's your opinion about the patches?  Are they
worth integrating into the main branch?  Thanks!

::

	Ivan Vilata i Balaguer   >qo<   http://www.carabos.com/
	       Cárabos Coop. V.  V  V   Enjoy Data
	                          ""
-------------- next part --------------
A non-text attachment was scrubbed...
Name: numexpr-int64str.tar.gz
Type: application/x-gzip
Size: 24891 bytes
Desc: not available
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060801/5bce97e7/attachment.gz 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 307 bytes
Desc: OpenPGP digital signature
Url : http://projects.scipy.org/pipermail/numpy-discussion/attachments/20060801/5bce97e7/attachment.bin 


More information about the Numpy-discussion mailing list