[Numpy-discussion] Deprecate boolean math operators?
Alexander Belopolsky
ndarray at mac.com
Thu Dec 5 23:14:52 EST 2013
On Thu, Dec 5, 2013 at 11:05 PM, Alan G Isaac <alan.isaac at gmail.com> wrote:
> For + and * (and thus `dot`), this will "fix" something that is not broken.
+ and * are not broken - just redundant given | and &.
What is really broken is -, both unary and binary:
>>> int(np.bool_(0) - np.bool_(1))
1
>>> int(-np.bool_(0))
1
> I'm sure I cannot be the only one who has for years taught students
> about Boolean matrices using NumPy
(I would not be so sure:-)
In that experience, did you find minus to be as useful?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20131205/34c04e5f/attachment.html>
More information about the NumPy-Discussion
mailing list