[Numpy-svn] r6231 - branches/fix_float_format/numpy/core/src

numpy-svn@scip... numpy-svn@scip...
Sun Dec 28 21:23:46 CST 2008


Author: cdavid
Date: 2008-12-28 21:23:43 -0600 (Sun, 28 Dec 2008)
New Revision: 6231

Modified:
   branches/fix_float_format/numpy/core/src/scalartypes.inc.src
Log:
    Use double format string for long double if necessary in scalar types repr/str.


Modified: branches/fix_float_format/numpy/core/src/scalartypes.inc.src
===================================================================
--- branches/fix_float_format/numpy/core/src/scalartypes.inc.src	2008-12-29 03:23:25 UTC (rev 6230)
+++ branches/fix_float_format/numpy/core/src/scalartypes.inc.src	2008-12-29 03:23:43 UTC (rev 6231)
@@ -5,6 +5,7 @@
 #endif
 #include "numpy/arrayscalars.h"
 
+#include "config.h"
 #include "npy_format.c"
 
 static PyBoolScalarObject _PyArrayScalar_BoolValues[2] = {
@@ -606,6 +607,11 @@
     return ret;
 }
 
+#ifdef FORCE_NO_LONG_DOUBLE_FORMATTING
+#undef NPY_LONGDOUBLE_FMT
+#define NPY_LONGDOUBLE_FMT NPY_DOUBLE_FMT
+#endif
+
 /**begin repeat
  * #name=float, double, longdouble#
  * #NAME=FLOAT, DOUBLE, LONGDOUBLE#



More information about the Numpy-svn mailing list