[Numpy-svn] r3551 - trunk/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Thu Feb 22 01:37:33 CST 2007


Author: oliphant
Date: 2007-02-22 01:37:28 -0600 (Thu, 22 Feb 2007)
New Revision: 3551

Modified:
   trunk/numpy/core/src/multiarraymodule.c
Log:
Fix mixed-kind scalar operations to use the standard in each kind.

Modified: trunk/numpy/core/src/multiarraymodule.c
===================================================================
--- trunk/numpy/core/src/multiarraymodule.c	2007-02-18 22:43:40 UTC (rev 3550)
+++ trunk/numpy/core/src/multiarraymodule.c	2007-02-22 07:37:28 UTC (rev 3551)
@@ -1902,14 +1902,14 @@
 		if (PyTypeNum_ISUSERDEF(neededtype)) return FALSE;
 		switch(scalar) {
 		case PyArray_INTPOS_SCALAR:
-			return (neededtype >= PyArray_BYTE);
+			return (neededtype >= PyArray_LONG);
 		case PyArray_INTNEG_SCALAR:
-			return (neededtype >= PyArray_BYTE) &&	\
+			return (neededtype >= PyArray_LONG) &&	\
 				!(PyTypeNum_ISUNSIGNED(neededtype));
 		case PyArray_FLOAT_SCALAR:
-			return (neededtype >= PyArray_FLOAT);
+			return (neededtype >= PyArray_DOUBLE);
 		case PyArray_COMPLEX_SCALAR:
-			return (neededtype >= PyArray_CFLOAT);
+			return (neededtype >= PyArray_CDOUBLE);
 		default:
 			return 1; /* should never get here... */
 		}



More information about the Numpy-svn mailing list