Boolean binary '-' operator
Hi All, The boolean binary '-' operator was deprecated back in NumPy 1.9 and changed to an error in 1.13. This caused a number of failures in downstream projects. The choices now are to continue the deprecation for another couple of releases, or simply give up on the change. For booleans, `a - b` was implemented as `a xor b`, which leads to the somewhat unexpected identity `a - b == b - a`, but it is a handy operator that allows simplification of some functions, `numpy.diff` among therm. At this point I'm inclined to give up on the deprecation and retain the old behavior. It is a bit impure but perhaps we can consider it a feature rather than a bug. The unary `-` operator for booleans, now an error, was also deprecated in 1.9 and changed to an error in 1.13. There have been no complaints about that (yet), and it seems like a reasonable thing to do, so I am inclined to leave that error in place. What do others think the correct way forward is? Chuck
participants (13)
-
Alan Isaac
-
Benjamin Root
-
Charles R Harris
-
Eric Wieser
-
josef.pktd@gmail.com
-
Juan Nunez-Iglesias
-
Julian Taylor
-
Marten van Kerkwijk
-
Nathan Goldbaum
-
Nathaniel Smith
-
Robert Kern
-
Sebastian Berg
-
Stefan van der Walt