<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 15, 2017 at 4:35 AM, Ralf Gommers <span dir="ltr"><<a href="mailto:ralf.gommers@gmail.com" target="_blank">ralf.gommers@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Thu, Jun 15, 2017 at 7:08 PM, Jaime Fernández del Río <span dir="ltr"><<a href="mailto:jaime.frio@gmail.com" target="_blank">jaime.frio@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span style="font-size:12.8px">There is an ongoing discussion on github:</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><a href="https://github.com/numpy/numpy/issues/9251" target="_blank">https://github.com/numpy/numpy<wbr>/issues/9251</a></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><font face="arial, helvetica, sans-serif">In 1.13 </font><font face="monospace, monospace">np.diff</font> has started raising on boolean arrays, since subtraction of  boolean arrays is now deprecated.</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">A decision has to be made whether:</div><div style="font-size:12.8px"><ul><li style="margin-left:15px">raising an error is the correct thing to do, and only the docstring needs updating, or</li><li style="margin-left:15px">backwards compatibility is more important and diff should still work on boolean arrays.</li></ul></div></div></blockquote><div><br></div></span><div>The issue is bigger than np.diff. For example, there's a problem with the scipy.ndimage morphology functions (<a href="https://github.com/scipy/scipy/issues/7493" target="_blank">https://github.com/scipy/<wbr>scipy/issues/7493</a>) that looks pretty serious. All ndimage.binary_* functions (7 of them) for example return boolean arrays, and chaining those is now broken. Unfortunately it seems that that wasn't covered by the ndimage test suite.<br><br></div><div>Possibly reverting the breaking change in 1.13.1 is the best way to fix this.<span class="HOEnZb"><font color="#888888"><br></font></span></div></div></div></div></blockquote><div><br></div><div>There were two related deprecations of boolean operators: subtraction and negative. I haven't heard any complaints about the second, which I think is less controversial, but I think reversion is the way to go for subtraction, at least for 1.13.1. The main virtue of the deprecations is clarity, xor is more informative when applied to boolean values than `-`, although the latter is certainly correct in F_2.<br><br></div><div>Chuck  <br></div></div><br></div></div>