Yeah, for subarrays == is a *scalar* equal, and the best definition of
scalar equal is probably array_equal(a, b), not (a == b).all(). (And
array_equal does require shape equality.)


On Fri, Sep 6, 2013 at 6:44 PM, Charles Harris <notifications@github.com>wrote:

> In numpy/core/tests/test_multiarray.py:
>
> > @@ -499,14 +499,11 @@ def test_subarray_comparison(self):
> >          assert_equal(a==b, [[True, False, False], [False, False, True]])
> >          assert_equal(b==a, [[True, False, False], [False, False, True]])
> >
> > -        # Check that incompatible sub-array shapes don't result to broadcasting
>
> Why do you think these tests are invalid? This looks like a change in
> behavior that should probably be discussed on the list. In order to have
> equality, I think you would need to argue that x and y behave the same in
> all circumstances.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/numpy/numpy/pull/3664/files#r6214332>
> .
>