[SciPy-dev] "item in array" currently unsupported

Travis Oliphant oliphant at ee.byu.edu
Thu Nov 17 14:07:58 EST 2005


Ed Schofield wrote:

>Hi all,
>
>The ability to use the test "item in array" seems to be a casualty from
>the recent change to newcore to raise an exception when interpreting
>arrays as truth values.  The old Numeric would allow this:
>  
>
You are right.  The contains function was using PyObject_RichCompareBool 
which relies on the "truth" value of the result.   This is easily 
changed and I will do it.

-Travis






More information about the SciPy-Dev mailing list