summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/umathmodule.c.src6
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/core/src/umathmodule.c.src b/numpy/core/src/umathmodule.c.src
index 760d6d57e..d037d9137 100644
--- a/numpy/core/src/umathmodule.c.src
+++ b/numpy/core/src/umathmodule.c.src
@@ -1683,10 +1683,10 @@ static void
#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 : \