From 172142b7fc5075c997bb19c6c009a1b4b2b3eaa6 Mon Sep 17 00:00:00 2001 From: immerrr Date: Sun, 2 Nov 2014 16:38:26 +0300 Subject: [PATCH] BUG: fix PyArray_IsPythonScalar to detect bytes objects on Python 3 --- numpy/core/include/numpy/ndarrayobject.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/core/include/numpy/ndarrayobject.h b/numpy/core/include/numpy/ndarrayobject.h index b8c7c3a2d38e..ae22d69d0a51 100644 --- a/numpy/core/include/numpy/ndarrayobject.h +++ b/numpy/core/include/numpy/ndarrayobject.h @@ -56,7 +56,7 @@ extern "C" CONFUSE_EMACS PyLong_Check(obj) || PyBool_Check(obj)) #define PyArray_IsPythonScalar(obj) \ - (PyArray_IsPythonNumber(obj) || PyString_Check(obj) || \ + (PyArray_IsPythonNumber(obj) || PyBytes_Check(obj) || \ PyUnicode_Check(obj)) #define PyArray_IsAnyScalar(obj) \