What steps will reproduce the problem?
a,b,c,d = True, False, "C", "D"
numexpr.evaluate("where(a>b,c,d)")
What is the expected output? What do you see instead?
Expected:
c
A TypeError is raised because int the function `numexpr.expressions.commonKind`
it is checked whether all nodes are type(str) but of course the first node a>b
will always be of type(bool).
I have created a custom dtype and have in the variables c and d a view on these
with the dtype=(str,nbytes). I would expect that it just returns the strings of
length nbytes.
I am guessing this is not implementable right now due to the fact that you
always expect all kinds to be of type str. I have not looked detailed enough
into the code to see if there is a solution.
What version of the product are you using? On what operating system?
Using numexpr.__version__ = 2.0.1 from pip install in Ubuntu 11.10.
Original issue reported on code.google.com by roder...@gmail.com on 9 Aug 2012 at 2:39
Original issue reported on code.google.com by
roder...@gmail.com
on 9 Aug 2012 at 2:39