Author: Brian Kearns <[email protected]>
Branch: 
Changeset: r67386:18fc7ef8ae01
Date: 2013-10-15 04:55 -0400
http://bitbucket.org/pypy/pypy/changeset/18fc7ef8ae01/

Log:    enable HALF typeinfo

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
@@ -822,7 +822,7 @@
             'UINT': self.w_uint32dtype,
             'INTP': self.w_intpdtype,
             'UINTP': self.w_uintpdtype,
-            #'HALF',
+            'HALF': self.w_float16dtype,
             'BYTE': self.w_int8dtype,
             #'TIMEDELTA',
             'INT': self.w_int32dtype,
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
@@ -903,7 +903,7 @@
         BaseNumpyAppTest.setup_class.im_func(cls)
 
     def test_typeinfo(self):
-        from numpypy import void, number, int64, bool_, complex64, complex128
+        from numpypy import void, number, int64, bool_, complex64, complex128, 
float16
         from numpypy.core.multiarray import typeinfo
         assert typeinfo['Number'] == number
         assert typeinfo['LONGLONG'] == ('q', 9, 64, 8, 9223372036854775807L, 
-9223372036854775808L, int64)
@@ -911,6 +911,7 @@
         assert typeinfo['BOOL'] == ('?', 0, 8, 1, 1, 0, bool_)
         assert typeinfo['CFLOAT'] == ('F', 14, 64, 4, complex64)
         assert typeinfo['CDOUBLE'] == ('D', 15, 128, 8, complex128)
+        assert typeinfo['HALF'] == ('e', 23, 16, 2, float16)
 
 class AppTestNoLongDoubleDtypes(BaseNumpyAppTest):
     def setup_class(cls):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to