Hi Gael,

More important is the following.


On Tue, 10 Jul 2007, Alan G Isaac apparently wrote: 
>>>> N.array([False])-N.array([True]) 
> array([True], dtype=bool) 
>>>> N.array([False])+(-N.array([True])) 
> array([False], dtype=bool) 

> The second answer is the right one, in this context.  
> I would call this [first!!!] answer a bug. 


Do you agree that the first (!!!) answer is a bug?
(The basis is apparently performed as follows:
integer array subtraction is first performed, and
then nonzero ints are converted to True.  But this
gives the wrong answer and most critically breaks
the equivalence of a-b and a+(-b).)

Cheers,
Alan


_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to