[pypy-commit] pypy numpypy-axisops: add test to cover no identity value in reduce
mattip
noreply at buildbot.pypy.org
Tue Jan 3 23:45:32 CET 2012
Author: mattip
Branch: numpypy-axisops
Changeset: r51004:6c64bd2290f9
Date: 2012-01-04 00:44 +0200
http://bitbucket.org/pypy/pypy/changeset/6c64bd2290f9/
Log: add test to cover no identity value in reduce
diff --git a/pypy/module/micronumpy/test/test_numarray.py b/pypy/module/micronumpy/test/test_numarray.py
--- a/pypy/module/micronumpy/test/test_numarray.py
+++ b/pypy/module/micronumpy/test/test_numarray.py
@@ -736,11 +736,13 @@
raises(TypeError, 'a.sum(2, 3)')
- def test_sumND(self):
+ def test_reduceND(self):
from numpypy import arange
a = arange(15).reshape(5, 3)
assert (a.sum(0) == [30, 35, 40]).all()
assert (a.sum(1) == [3, 12, 21, 30, 39]).all()
+ assert (a.max(0) == [12, 13, 14]).all()
+ assert (a.max(1) == [2, 5, 8, 11, 14]).all()
def test_identity(self):
from numpypy import identity, array
More information about the pypy-commit
mailing list