[Numpy-svn] r5895 - branches/ufunc_cleanup/numpy/core/src

numpy-svn at scipy.org numpy-svn at scipy.org
Thu Oct 2 22:22:32 EDT 2008


Author: charris
Date: 2008-10-02 21:22:31 -0500 (Thu, 02 Oct 2008)
New Revision: 5895

Modified:
   branches/ufunc_cleanup/numpy/core/src/umathmodule.c.src
Log:
Make the complex nans returned from fmax/fmin/maximum/minimum have both real and
imaginary parts set to nan.


Modified: branches/ufunc_cleanup/numpy/core/src/umathmodule.c.src
===================================================================
--- branches/ufunc_cleanup/numpy/core/src/umathmodule.c.src	2008-10-03 02:19:17 UTC (rev 5894)
+++ branches/ufunc_cleanup/numpy/core/src/umathmodule.c.src	2008-10-03 02:22:31 UTC (rev 5895)
@@ -2021,7 +2021,7 @@
         }
         else {
             ((@type@ *)op)[0] = NAN;
-            ((@type@ *)op)[1] = 0;
+            ((@type@ *)op)[1] = NAN;
         }
     }
 }
@@ -2042,7 +2042,7 @@
         if (@OP1@(in1r, in1i, in2r, in2i) || isnan(in2r) || isnan(in2i)) {
             if (isnan(in1r) || isnan(in1i)) {
                 ((@type@ *)op)[0] = NAN;
-                ((@type@ *)op)[1] = 0;
+                ((@type@ *)op)[1] = NAN;
             }
             else {
                 ((@type@ *)op)[0] = in1r;




More information about the Numpy-svn mailing list