Author: Matti Picus <[email protected]>
Branch: missing-ndarray-attributes
Changeset: r60649:9a8d7248bf7b
Date: 2013-01-29 07:31 +0200
http://bitbucket.org/pypy/pypy/changeset/9a8d7248bf7b/

Log:    add a failing test

diff --git a/pypy/module/micronumpy/arrayimpl/sort.py 
b/pypy/module/micronumpy/arrayimpl/sort.py
--- a/pypy/module/micronumpy/arrayimpl/sort.py
+++ b/pypy/module/micronumpy/arrayimpl/sort.py
@@ -88,7 +88,7 @@
             arr.dtype.is_complex_type()):
         raise OperationError(space.w_NotImplementedError,
            space.wrap("sorting of non-numeric types " + \
-                        "'%r' is not implemented" % arr.dtype ))
+                      "'%s' is not implemented" % arr.dtype.get_name() ))
     # this is for translation
     assert isinstance(itemtype, types.Float) or \
            isinstance(itemtype, types.Integer) or \
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
@@ -346,6 +346,10 @@
         b = a.copy()
         assert (b == a).all()
 
+        a = array(['abc', 'def','xyz'], dtype='S3')
+        b = a.copy()
+        assert (b == a).all()
+
     def test_iterator_init(self):
         from _numpypy import array
         a = array(range(5))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to