[pypy-commit] pypy default: add uint alias, test more aliases

bdkearns noreply at buildbot.pypy.org
Tue Feb 26 09:19:11 CET 2013


Author: Brian Kearns <bdkearns at gmail.com>
Branch: 
Changeset: r61812:7d06b6fb37da
Date: 2013-02-26 00:41 -0500
http://bitbucket.org/pypy/pypy/changeset/7d06b6fb37da/

Log:	add uint alias, test more aliases

diff --git a/pypy/module/micronumpy/interp_dtype.py b/pypy/module/micronumpy/interp_dtype.py
--- a/pypy/module/micronumpy/interp_dtype.py
+++ b/pypy/module/micronumpy/interp_dtype.py
@@ -419,6 +419,7 @@
             w_box_type=space.gettypefor(interp_boxes.W_ULongBox),
             alternate_constructors=[ space.gettypefor(interp_boxes.W_UnsignedIntegerBox),
                                    ],
+            aliases=['uint'],
         )
         self.w_int64dtype = W_Dtype(
             types.Int64(),
diff --git a/pypy/module/micronumpy/test/test_dtypes.py b/pypy/module/micronumpy/test/test_dtypes.py
--- a/pypy/module/micronumpy/test/test_dtypes.py
+++ b/pypy/module/micronumpy/test/test_dtypes.py
@@ -62,8 +62,12 @@
             assert dtype('int64').num == 7
             assert dtype('uint64').num == 8
         assert dtype(int).num == 7
+        assert dtype('int').num == 7
+        assert dtype('uint').num == 8
         assert dtype(long).num == 9
         assert dtype(float).num == 12
+        assert dtype('float').num == 12
+        assert dtype('complex').num == 15
 
     def test_array_dtype_attr(self):
         from numpypy import array, dtype


More information about the pypy-commit mailing list