Commits

Anonymous committed ee1b4ea

add failing test, add fix

  • Participants
  • Parent commits 8688ce4

Comments (0)

Files changed (2)

File pypy/module/micronumpy/interp_iter.py

                 offset += self.strides[i]
                 break
             else:
+                if i == self.dim:
+                    first_line = True
                 indices[i] = 0
                 offset -= self.backstrides[i]
         else:

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

         assert ((a + a).T.sum(2).T == (a + a).sum(0)).all()
         assert (a.reshape(1,-1).sum(0) == range(105)).all()
         assert (a.reshape(1,-1).sum(1) == 5460)
+        assert (array([[1,2],[3,4]]).prod(0) == [3, 8]).all()
+        assert (array([[1,2],[3,4]]).prod(1) == [2, 12]).all()
 
     def test_identity(self):
         from _numpypy import identity, array