Commits

Romain Guillebert committed ddd048d

ndarray.__eq__ should return False when shapes are incompatible, add a test for that

  • Participants
  • Parent commits ab0486a

Comments (0)

Files changed (1)

File pypy/module/micronumpy/test/test_numarray.py

         b = array(a, dtype='d')
         assert a.dtype is b.dtype
 
+    def test_notequal_different_shapes(self):
+        from _numpypy import array
+        a = array([1, 2])
+        b = array([1, 2, 3, 4])
+        assert (a == b) == False
+
 
 class AppTestMultiDim(BaseNumpyAppTest):
     def test_init(self):