Author: Maciej Fijalkowski <[email protected]>
Branch: numpy-back-to-applevel
Changeset: r51793:233034cea174
Date: 2012-01-26 14:56 +0200
http://bitbucket.org/pypy/pypy/changeset/233034cea174/

Log:    more tests

diff --git a/pypy/module/micronumpy/interp_numarray.py 
b/pypy/module/micronumpy/interp_numarray.py
--- a/pypy/module/micronumpy/interp_numarray.py
+++ b/pypy/module/micronumpy/interp_numarray.py
@@ -618,7 +618,7 @@
         concr = self.get_concrete()
         if space.is_w(w_axis, space.w_None):
             concr = concr.descr_ravel(space)
-        if len(concr.shape) > 1:
+        else:
             xxx
         index_i = index.create_iter()
         res_shape = index.shape
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
@@ -1408,6 +1408,10 @@
         raises(IndexError, "arange(3).take([15])")
         a = arange(6).reshape(2, 3)
         assert (a.take([1, 0, 3]) == [1, 0, 3]).all()
+        assert ((a + a).take([3]) == [6]).all()
+        a = arange(12).reshape(2, 6)
+        assert (a[:,::2].take([3, 2, 1]) == [6, 4, 2]).all()
+            
 
 class AppTestSupport(BaseNumpyAppTest):
     def setup_class(cls):
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to