On 12/22/2009 09:05 AM, David Cournapeau wrote:
Hi,
I have just released the 2nd release candidate for numpy 1.4.0, which
fixes a few critical bugs founds since the RC1. Tarballs and binary
installers for numpy/scipy may be found on
https://sourceforge.net/projects/numpy.
cheers,
David
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion
Hi,
This still crashes Python 2.7 with the test_multiarray.TestIO.test_ascii.
The file numpy/core/src/multiarray/numpyos.c needs a change as per this
thread:
"test_multiarray.TestIO.test_ascii segmentation fault with Python2.7"
http://mail.scipy.org/pipermail/numpy-discussion/2009-December/047481.html
The segmentation fault is avoided with this patch derived from the
current numpy-1.4RC2 version and not the SVN version.
Bruce
--- numpyos.c 2009-12-22 09:36:58.000000000 -0600
+++ ../numpy-1.4.0rc2/numpy/core/src/multiarray/numpyos.c 2009-12-22
09:44:04.000000000 -0600
@@ -506,7 +506,11 @@
}
memcpy(buffer, s, n);
buffer[n] = '\0';
+#if PY_VERSION_HEX >= 0x02070000
+ result = PyOS_string_to_double(buffer, &q, NULL);
+#else
result = PyOS_ascii_strtod(buffer, &q);
+#endif
if (endptr != NULL) {
*endptr = (char*)(s + (q - buffer));
}
@@ -515,7 +519,11 @@
}
/* End of ##2 */
+#if PY_VERSION_HEX >= 0x02070000
+ return PyOS_string_to_double(s, endptr, NULL);
+#else
return PyOS_ascii_strtod(s, endptr);
+#endif
}
_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion