[Numpy-svn] r4969 - trunk/numpy/core/include/numpy

numpy-svn@scip... numpy-svn@scip...
Sun Apr 6 16:59:30 CDT 2008


Author: oliphant
Date: 2008-04-06 16:59:28 -0500 (Sun, 06 Apr 2008)
New Revision: 4969

Modified:
   trunk/numpy/core/include/numpy/ndarrayobject.h
Log:
Remove redundant check because PyObject_TypeCheck already includes an exact check.

Modified: trunk/numpy/core/include/numpy/ndarrayobject.h
===================================================================
--- trunk/numpy/core/include/numpy/ndarrayobject.h	2008-04-06 02:34:19 UTC (rev 4968)
+++ trunk/numpy/core/include/numpy/ndarrayobject.h	2008-04-06 21:59:28 UTC (rev 4969)
@@ -1830,9 +1830,7 @@
 
 #define PyArray_DescrCheck(op) ((op)->ob_type == &PyArrayDescr_Type)
 
-#define PyArray_Check(op) ((op)->ob_type == &PyArray_Type ||                  \
-                           PyObject_TypeCheck(op, &PyArray_Type))
-
+#define PyArray_Check(op) PyObject_TypeCheck(op, &PyArray_Type)
 #define PyArray_CheckExact(op) ((op)->ob_type == &PyArray_Type)
 
 #define PyArray_HasArrayInterfaceType(op, type, context, out)                 \



More information about the Numpy-svn mailing list