[Numpy-svn] r5475 - branches/1.1.x/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Sun Jul 20 16:19:29 CDT 2008


Author: charris
Date: 2008-07-20 16:19:26 -0500 (Sun, 20 Jul 2008)
New Revision: 5475

Modified:
   branches/1.1.x/numpy/core/src/umathmodule.c.src
Log:
Fix use of NAN for MSVC platforms.


Modified: branches/1.1.x/numpy/core/src/umathmodule.c.src
===================================================================
--- branches/1.1.x/numpy/core/src/umathmodule.c.src	2008-07-20 20:35:02 UTC (rev 5474)
+++ branches/1.1.x/numpy/core/src/umathmodule.c.src	2008-07-20 21:19:26 UTC (rev 5475)
@@ -1682,10 +1682,10 @@
 
 #define BOOL_negative BOOL_logical_not
 
-#define _SIGN1(x) (isnan((x)) ? NAN : ((x) > 0 ? 1 : ((x) < 0 ? -1 : 0)) )
+#define _SIGN1(x) (isnan((x)) ? (x) : ((x) > 0 ? 1 : ((x) < 0 ? -1 : 0)) )
 #define _SIGN2(x) ((x) == 0 ? 0 : 1)
-#define _SIGNC(x) (isnan((x.real)) ? NAN : \
-                   isnan((x.imag)) ? NAN : \
+#define _SIGNC(x) (isnan((x).real) ? (x).real : \
+                   isnan((x).imag) ? (x).imag : \
                    ((x).real > 0) ? 1 : \
                    ((x).real < 0 ? -1 : \
                    ((x).imag > 0 ? 1 : \



More information about the Numpy-svn mailing list