Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r67395:d535d39ec0d7
Date: 2013-10-15 06:54 -0400
http://bitbucket.org/pypy/pypy/changeset/d535d39ec0d7/

Log:    test for ravel

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
@@ -24,6 +24,13 @@
         b[1] = 0
         assert argmin(b) == 0
 
+    def test_ravel(self):
+        import numpypy as np
+        a = np.ravel(np.float64(1))
+        assert np.array_equal(a, [1.])
+        a = np.ravel(np.array([[1, 2, 3], [4, 5, 6]]))
+        assert np.array_equal(a, [1, 2, 3, 4, 5, 6])
+
     def test_shape(self):
         # tests taken from numpy/core/fromnumeric.py docstring
         from numpypy import identity, shape
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to