[Numpy-svn] r6420 - branches/coremath/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Thu Feb 19 08:46:21 CST 2009


Author: cdavid
Date: 2009-02-19 08:46:01 -0600 (Thu, 19 Feb 2009)
New Revision: 6420

Modified:
   branches/coremath/numpy/core/src/umath_loops.inc.src
Log:
Use npymath for isnan and co.

Modified: branches/coremath/numpy/core/src/umath_loops.inc.src
===================================================================
--- branches/coremath/numpy/core/src/umath_loops.inc.src	2009-02-19 14:40:16 UTC (rev 6419)
+++ branches/coremath/numpy/core/src/umath_loops.inc.src	2009-02-19 14:46:01 UTC (rev 6420)
@@ -860,7 +860,7 @@
 
 /**begin repeat1
  * #kind = isnan, isinf, isfinite, signbit#
- * #func = isnan, isinf, isfinite, signbit#
+ * #func = npy_isnan, npy_isinf, npy_isfinite, npy_signbit#
  **/
 static void
 @TYPE@_@kind@(char **args, intp *dimensions, intp *steps, void *NPY_UNUSED(func))
@@ -883,7 +883,7 @@
     BINARY_LOOP {
         const @type@ in1 = *(@type@ *)ip1;
         const @type@ in2 = *(@type@ *)ip2;
-        *((@type@ *)op1) = (in1 @OP@ in2 || isnan(in1)) ? in1 : in2;
+        *((@type@ *)op1) = (in1 @OP@ in2 || npy_isnan(in1)) ? in1 : in2;
     }
 }
 /**end repeat1**/
@@ -899,7 +899,7 @@
     BINARY_LOOP {
         const @type@ in1 = *(@type@ *)ip1;
         const @type@ in2 = *(@type@ *)ip2;
-        *((@type@ *)op1) = (in1 @OP@ in2 || isnan(in2)) ? in1 : in2;
+        *((@type@ *)op1) = (in1 @OP@ in2 || npy_isnan(in2)) ? in1 : in2;
     }
 }
 /**end repeat1**/
@@ -1173,7 +1173,7 @@
 
 /**begin repeat1
  * #kind = isnan, isinf, isfinite#
- * #func = isnan, isinf, isfinite#
+ * #func = npy_isnan, npy_isinf, npy_isfinite#
  * #OP = ||, ||, &&#
  **/
 static void
@@ -1272,7 +1272,7 @@
         const @type@ in1i = ((@type@ *)ip1)[1];
         const @type@ in2r = ((@type@ *)ip2)[0];
         const @type@ in2i = ((@type@ *)ip2)[1];
-        if (@OP@(in1r, in1i, in2r, in2i) || isnan(in1r) || isnan(in1i)) {
+        if (@OP@(in1r, in1i, in2r, in2i) || npy_isnan(in1r) || npy_isnan(in1i)) {
             ((@type@ *)op1)[0] = in1r;
             ((@type@ *)op1)[1] = in1i;
         }
@@ -1296,7 +1296,7 @@
         const @type@ in1i = ((@type@ *)ip1)[1];
         const @type@ in2r = ((@type@ *)ip2)[0];
         const @type@ in2i = ((@type@ *)ip2)[1];
-        if (@OP@(in1r, in1i, in2r, in2i) || isnan(in2r) || isnan(in2i)) {
+        if (@OP@(in1r, in1i, in2r, in2i) || npy_isnan(in2r) || npy_isnan(in2i)) {
             ((@type@ *)op1)[0] = in1r;
             ((@type@ *)op1)[1] = in1i;
         }



More information about the Numpy-svn mailing list