[pypy-commit] pypy default: add this test for numpypy.sum also
bdkearns
noreply at buildbot.pypy.org
Sat Feb 23 03:47:56 CET 2013
Author: Brian Kearns <bdkearns at gmail.com>
Branch:
Changeset: r61636:a6ca90ce76e9
Date: 2013-02-22 21:38 -0500
http://bitbucket.org/pypy/pypy/changeset/a6ca90ce76e9/
Log: add this test for numpypy.sum also
diff --git a/pypy/module/test_lib_pypy/numpypy/core/test_fromnumeric.py b/pypy/module/test_lib_pypy/numpypy/core/test_fromnumeric.py
--- a/pypy/module/test_lib_pypy/numpypy/core/test_fromnumeric.py
+++ b/pypy/module/test_lib_pypy/numpypy/core/test_fromnumeric.py
@@ -36,7 +36,7 @@
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
@@ -47,6 +47,7 @@
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]])
More information about the pypy-commit
mailing list