Author: Brian Kearns <[email protected]>
Branch: remove-numpypy
Changeset: r67717:95d54735555f
Date: 2013-10-29 19:33 -0400
http://bitbucket.org/pypy/pypy/changeset/95d54735555f/

Log:    port test_subtype

diff --git a/pypy/module/micronumpy/test/test_subtype.py 
b/pypy/module/micronumpy/test/test_subtype.py
--- a/pypy/module/micronumpy/test/test_subtype.py
+++ b/pypy/module/micronumpy/test/test_subtype.py
@@ -15,10 +15,10 @@
                     self.called_finalize = True
             return NoNew ''')
         cls.w_SubType = cls.space.appexec([], '''():
-            from numpypy import ndarray, asarray
+            from numpypy import ndarray, array
             class SubType(ndarray):
                 def __new__(obj, input_array):
-                    obj = asarray(input_array).view(obj)
+                    obj = array(input_array, copy=False).view(obj)
                     obj.called_new = True
                     return obj
                 def __array_finalize__(self, obj):
@@ -106,9 +106,9 @@
         assert not isinstance(b, self.NoNew)
 
     def test_sub_repeat(self):
-        from numpypy import repeat, array
+        from numpypy import array
         a = self.SubType(array([[1, 2], [3, 4]]))
-        b =  repeat(a, 3)
+        b = a.repeat(3)
         assert (b == [1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4]).all()
         assert isinstance(b, self.SubType)
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to