summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2008-07-20 22:52:40 +0000
committerCharles Harris <charlesr.harris@gmail.com>2008-07-20 22:52:40 +0000
commitd045a20c3232ffc0550d3f62a46bcd05f7b9761b (patch)
tree21ebaa1f3088f0aab2602bb99f48fdb643afda64 /numpy
parent2de0cbb31f82437601eca2df23f53525e5fb204d (diff)
downloadnumpy-d045a20c3232ffc0550d3f62a46bcd05f7b9761b.tar.gz
Revert r5470.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/umathmodule.c.src10
1 files changed, 2 insertions, 8 deletions
diff --git a/numpy/core/src/umathmodule.c.src b/numpy/core/src/umathmodule.c.src
index d037d9137..9096cdbf1 100644
--- a/numpy/core/src/umathmodule.c.src
+++ b/numpy/core/src/umathmodule.c.src
@@ -1683,15 +1683,9 @@ static void
#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#