[Numpy-discussion] Int64 and string support for numexpr

Tim Hochberg tim.hochberg at ieee.org
Wed Aug 2 18:09:52 EDT 2006


Ivan Vilata i Balaguer wrote:
> 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!
>   
Unfortunately, I'm in the process of moving everything over to a new 
box, so my build environment is all broken and I can't try them out 
right now.

However, just so you don't think everyone is ignoring you, I figured I'd 
reply. What use cases do you have in mind for the string comparison 
stuff? Strings are one of those features of numpy that I've personally 
never seen a use for, so I'm not that enthusiastic about them them in 
numarray,  Particularly since it sounds like support is likely to only 
be partial. However, feel free to convince me otherwise. Or just 
convince David Cooke ;-)

-tim



> ::
>
> 	Ivan Vilata i Balaguer   >qo<   http://www.carabos.com/
> 	       Cárabos Coop. V.  V  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
> ------------------------------------------------------------------------
>
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/numpy-discussion
>   






More information about the NumPy-Discussion mailing list