Commits

Brian Kearns  committed a6ca90c

add this test for numpypy.sum also

  • Participants
  • Parent commits df3dbf3

Comments (0)

Files changed (1)

File pypy/module/test_lib_pypy/numpypy/core/test_fromnumeric.py

 
     def test_sum(self):
         # tests taken from numpy/core/fromnumeric.py docstring
-        from numpypy import array, sum, ones
+        from numpypy import array, sum, ones, zeros
         assert sum([0.5, 1.5])== 2.0
         assert sum([[0, 1], [0, 5]]) == 6
         # assert sum([0.5, 0.7, 0.2, 1.5], dtype=int32) == 1
 
         assert sum(range(10)) == 45
         assert sum(array(range(10))) == 45
+        assert list(sum(zeros((0, 2)), axis=1)) == []
 
         a = array([[1, 2], [3, 4]])
         out = array([[0, 0], [0, 0]])