[pypy-commit] pypy ndmin: add failing test of ndmin parameter of numpy.array

MichaelBlume noreply at buildbot.pypy.org
Thu Mar 22 20:53:58 CET 2012


Author: Mike Blume <mike at loggly.com>
Branch: ndmin
Changeset: r53922:67cb9cfe42fe
Date: 2012-03-19 23:41 -0700
http://bitbucket.org/pypy/pypy/changeset/67cb9cfe42fe/

Log:	add failing test of ndmin parameter of numpy.array

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
@@ -211,6 +211,12 @@
         assert a.shape == (3,)
         assert a.dtype is dtype(int)
 
+    def test_ndmin(self):
+        from _numpypy import array
+
+        arr = array([1], ndmin=3)
+        assert arr.shape == (1, 1, 1)
+
     def test_type(self):
         from _numpypy import array
         ar = array(range(5))


More information about the pypy-commit mailing list