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

numpy-svn@scip... numpy-svn@scip...
Sun Jul 20 17:52:42 CDT 2008


Author: charris
Date: 2008-07-20 17:52:40 -0500 (Sun, 20 Jul 2008)
New Revision: 5477

Modified:
   trunk/numpy/core/src/umathmodule.c.src
Log:
Revert r5470.

Modified: trunk/numpy/core/src/umathmodule.c.src
===================================================================
--- trunk/numpy/core/src/umathmodule.c.src	2008-07-20 21:55:43 UTC (rev 5476)
+++ trunk/numpy/core/src/umathmodule.c.src	2008-07-20 22:52:40 UTC (rev 5477)
@@ -1683,15 +1683,9 @@
 
 #define BOOL_negative BOOL_logical_not
 
-#define _SIGN1(x) (isnan((x)) ? (x) : ((x) > 0 ? 1 : ((x) < 0 ? -1 : 0)) )
+#define _SIGN1(x) ((x) > 0 ? 1 : ((x) < 0 ? -1 : 0))
 #define _SIGN2(x) ((x) == 0 ? 0 : 1)
-#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 : \
-                   ((x).imag < 0) ? -1 : 0)))
-
+#define _SIGNC(x) (((x).real > 0) ? 1 : ((x).real < 0 ? -1 : ((x).imag > 0 ? 1 : ((x).imag < 0) ? -1 : 0)))
 /**begin repeat
    #TYPE=BYTE,SHORT,INT,LONG,LONGLONG,FLOAT,DOUBLE,LONGDOUBLE,UBYTE,USHORT,UINT,ULONG,ULONGLONG#
    #typ=byte,short,int,long,longlong,float,double,longdouble,ubyte,ushort,uint,ulong,ulonglong#



More information about the Numpy-svn mailing list