[pypy-commit] pypy numpy-back-to-applevel: make sure it works on multidim arrays as well

fijal noreply at buildbot.pypy.org
Thu Jan 26 18:13:49 CET 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: numpy-back-to-applevel
Changeset: r51802:349ebdfc7cde
Date: 2012-01-26 17:29 +0200
http://bitbucket.org/pypy/pypy/changeset/349ebdfc7cde/

Log:	make sure it works on multidim arrays as well

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
@@ -1451,8 +1451,11 @@
         assert (a.compress([True, False, True]) == [0, 2]).all()
         assert (a.compress([1, 0, 13]) == [0, 2]).all()
         assert (a.compress([1, 0, 13.5]) == [0, 2]).all()
+        a = arange(10).reshape(2, 5)
+        assert (a.compress([True, False, True]) == [0, 2]).all()
         raises(IndexError, "a.compress([1] * 100)")
 
+
 class AppTestSupport(BaseNumpyAppTest):
     def setup_class(cls):
         import struct


More information about the pypy-commit mailing list