[Numpy-discussion] Should bool_ subclass int?
Alan G Isaac
aisaac at american.edu
Tue Jul 10 11:31:35 EDT 2007
More important is the following.
On Tue, 10 Jul 2007, Alan G Isaac apparently wrote:
> array([True], dtype=bool)
> 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).)
More information about the NumPy-Discussion