Repository navigation
Revert "DEP: Raise TypeError for subtract(bool_, bool_)." - #9255
Conversation
|
I would also revert the error for negative and positive for consistency. |
There was a problem hiding this comment.
Seems like there's no reason to lose this second test?
This reverts commit c9adc35.
7fec80d to
45598d7
Compare
If someone reports a problem I will consider it. Note that |
Can you elaborate on when this is true? Or are you just remarking that only one of these gives a TypeError |
|
Also it conflicts with Python. |
|
@eric-wieser I was just remarking on the state before the deprecations where the unary |
Perhaps then the deprecation should become a futurewarning, after which the loop becomes |
|
IIRC, we basically said that we should first make it an error a while, and then pick up that discussion @eric-wieser. |
|
The python behavior is also pretty weird, and reflects the their history of using 0 and 1 as the bools for a long time, and then adding False and True as effectively aliases for those. (Notice |
|
OK, putting this in. Might to this for 1.14 later as the deprecation cycle is just getting underway for real ;) |
|
We could even go for the VisibleDeprecationWarning for 1.14 if we expect more problems (especially, if we expect not too uncommon usage in small scripts, etc.) |
|
@seberg Yeah, that might be a good idea, raising a exception sure helped visibility... |
This seems like a nice idea. In fact it is more informative that |
|
@jakirkham Might want to open issue, it would be more visible than this merged PR. |
This reverts commit c9adc35.
Don't raise
TypeErrorfor boolean subtraction in Numpy 1.13, see discussion at #9251.Closes #9251.