Something that we just ran into trying to merge a scipy PR:<br><br>With 1.5.1:<br>>>> np.arange(10)[np.array([0,1,0,1,2,3]) > 0]<br>array([1, 3, 4, 5])<br><br>With current master:<br>
In [1]: np.arange(10)[np.array([0,1,0,1,2,3]) > 0]<br>
---------------------------------------------------------------------------<br>
ValueError                                Traceback (most recent call last)<br>
/Users/rgommers/<ipython-input-1-49ea14823e3d> in <module>()<br>
----> 1 np.arange(10)[np.array([0,1,0,1,2,3]) > 0]<br>
<br>
ValueError: operands could not be broadcast together with shapes (10) (6) <br>
<br><br>The reason for this is noted in the 2.0.0 release notes:<br>"Full-array boolean indexing used to allow boolean arrays with a size<br>non-broadcastable to the array size. Now it forces this to be broadcastable.<br>
Since this affects some legacy code, this change will require discussion<br>during alpha or early beta testing, and a decision to either keep the<br>stricter behavior, or add in a hack to allow the previous behavior to<br>
work.<br>"<br><br>I'm not opposed to the change in principle, but just wanted to note it can lead to code breaking and puzzled users.<br><br>Ralf<br><br>