[Numpy-discussion] Deprecate boolean math operators?
Alan G Isaac
alan.isaac at gmail.com
Fri Dec 6 10:32:11 EST 2013
> On Thu, Dec 5, 2013 at 8:05 PM, Alan G Isaac
> <alan.isaac at gmail.com> wrote:
>> For + and * (and thus `dot`), this will "fix" something that is not broken.
>> It is in fact in conformance with a large literature on boolean arrays
>> and boolean matrices.
On 12/6/2013 3:24 AM, Nathaniel Smith wrote:
> Interesting point! I had assumed that dot() just upcast! But what do
> you think about the inconsistency between sum() and dot() on bool
I don't like the behavior of sum on bool arrays.
(I.e., automatic upcasting.)
But I do not suggest changing it,
as much code is likely to depend on it.
More information about the NumPy-Discussion