[Numpy-svn] r8129 - trunk/numpy/core/src/multiarray

numpy-svn@scip... numpy-svn@scip...
Sat Feb 20 12:03:00 CST 2010


Author: ptvirtan
Date: 2010-02-20 12:03:00 -0600 (Sat, 20 Feb 2010)
New Revision: 8129

Modified:
   trunk/numpy/core/src/multiarray/descriptor.c
Log:
3K: BUG: bytes as dtype should map to 1-byte strings, not long

Modified: trunk/numpy/core/src/multiarray/descriptor.c
===================================================================
--- trunk/numpy/core/src/multiarray/descriptor.c	2010-02-17 23:55:16 UTC (rev 8128)
+++ trunk/numpy/core/src/multiarray/descriptor.c	2010-02-20 18:03:00 UTC (rev 8129)
@@ -1217,15 +1217,9 @@
         else if (obj == (PyObject *)(&PyBool_Type)) {
             check_num = PyArray_BOOL;
         }
-#if defined(NPY_PY3K)
         else if (obj == (PyObject *)(&PyBytes_Type)) {
-            check_num = PyArray_LONG;
-        }
-#else
-        else if (obj == (PyObject *)(&PyBytes_Type)) {
             check_num = PyArray_STRING;
         }
-#endif
         else if (obj == (PyObject *)(&PyUnicode_Type)) {
             check_num = PyArray_UNICODE;
         }



More information about the Numpy-svn mailing list