summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorDavid Cournapeau <cournape@gmail.com>2008-12-30 05:24:11 +0000
committerDavid Cournapeau <cournape@gmail.com>2008-12-30 05:24:11 +0000
commit044d8a30cf0e628f1bf0b7560bd90689ea11d0ee (patch)
tree2dfd33fff2c636f4191d395dbe9e1b407555e093 /numpy
parent04cc210a41ada5ef3165cc3915ca5107e4c37e99 (diff)
downloadnumpy-044d8a30cf0e628f1bf0b7560bd90689ea11d0ee.tar.gz
Force at least 3 digits for the exponent on windows and python < 2.6.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/src/npy_format.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/core/src/npy_format.c b/numpy/core/src/npy_format.c
index b463077aa..606fbfeb5 100644
--- a/numpy/core/src/npy_format.c
+++ b/numpy/core/src/npy_format.c
@@ -4,7 +4,12 @@
The exponent always contains at least two digits, and only as many more digits
as necessary to represent the exponent.
*/
+/* We force 3 digits on windows for python < 2.6 for compatibility reason */
+#ifdef MS_WIN32 && PY_VERSION_HEX < 0x02060000
+#define MIN_EXPONENT_DIGITS 3
+#else
#define MIN_EXPONENT_DIGITS 2
+#endif
/* Ensure that any exponent, if present, is at least MIN_EXPONENT_DIGITS
in length. */