Author: Brian Kearns <[email protected]>
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
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to