[Numpy-svn] r6219 - trunk/numpy/core/src

numpy-svn at scipy.org numpy-svn at scipy.org
Sat Dec 27 12:26:06 EST 2008


Author: cdavid
Date: 2008-12-27 11:25:50 -0600 (Sat, 27 Dec 2008)
New Revision: 6219

Modified:
   trunk/numpy/core/src/scalartypes.inc.src
Log:
Use ugly hack for mingw long double pb with complex format function as well.

Modified: trunk/numpy/core/src/scalartypes.inc.src
===================================================================
--- trunk/numpy/core/src/scalartypes.inc.src	2008-12-27 17:19:40 UTC (rev 6218)
+++ trunk/numpy/core/src/scalartypes.inc.src	2008-12-27 17:25:50 UTC (rev 6219)
@@ -689,14 +689,14 @@
     char format[32];
     if (val.real == 0.0) {
         PyOS_snprintf(format, sizeof(format), "%%.%i" NPY_ at NAME@_FMT, prec);
-        PyOS_snprintf(buf, buflen - 1, format, val.imag);
+        PyOS_snprintf(buf, buflen - 1, format, _CAST_ at NAME@(val.imag));
         strncat(buf, "j", 1);
     } else {
         char re[64], im[64];
         PyOS_snprintf(format, sizeof(format), "%%.%i" NPY_ at NAME@_FMT, prec);
-        PyOS_snprintf(re, sizeof(re), format, val.real);
+        PyOS_snprintf(re, sizeof(re), format, _CAST_ at NAME@(val.real));
         PyOS_snprintf(format, sizeof(format), "%%+.%i" NPY_ at NAME@_FMT, prec);
-        PyOS_snprintf(im, sizeof(im), format, val.imag);
+        PyOS_snprintf(im, sizeof(im), format, _CAST_ at NAME@(val.imag));
         PyOS_snprintf(buf, buflen, "(%s%sj)", re, im);
     }
 }




More information about the Numpy-svn mailing list