[pypy-commit] pypy default: expose transpose under a yet-different name

fijal noreply at buildbot.pypy.org
Tue Feb 14 11:26:45 CET 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r52442:44066f86ba12
Date: 2012-02-14 12:25 +0200
http://bitbucket.org/pypy/pypy/changeset/44066f86ba12/

Log:	expose transpose under a yet-different name

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
@@ -1297,6 +1297,7 @@
     nbytes = GetSetProperty(BaseArray.descr_get_nbytes),
 
     T = GetSetProperty(BaseArray.descr_get_transpose),
+    transpose = interp2app(BaseArray.descr_get_transpose),
     flat = GetSetProperty(BaseArray.descr_get_flatiter),
     ravel = interp2app(BaseArray.descr_ravel),
     item = interp2app(BaseArray.descr_item),
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
@@ -1487,6 +1487,7 @@
         a = array((range(10), range(20, 30)))
         b = a.T
         assert(b[:, 0] == a[0, :]).all()
+        assert (a.transpose() == b).all()
 
     def test_flatiter(self):
         from _numpypy import array, flatiter, arange


More information about the pypy-commit mailing list