Commits

Romain Guillebert  committed b5c8021

sum doesn't exist in numpypy

  • Participants
  • Parent commits 0559ff1
  • Branches numpypy-array_prepare_-array_wrap

Comments (0)

Files changed (1)

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

         raises(TypeError, log, a, out=c)
 
     def test___array_prepare__reduce(self):
-        from numpypy import ndarray, array, sum, ones, add
+        from numpypy import ndarray, array, ones, add
         class with_prepare(ndarray):
             def __array_prepare__(self, arr, context):
                 x = array(arr).view(type=with_prepare)
                 print 'called_prepare',arr
                 return x
         a = ones(2).view(type=with_prepare)
-        x = sum(a)
+        x = a.sum()
         assert type(x) == with_prepare
         assert x.shape == ()
         # reduce functions do not call prepare, is this a numpy 'feature'?
         assert type(x) == with_prepare
         assert not getattr(x, 'called_prepare',False)
         a = ones((2,3)).view(type=with_prepare)
-        x = sum(a, axis=0)
+        x = a.sum(axis=0)
         assert type(x) == with_prepare
         assert not getattr(x, 'called_prepare',False)