[Numpy-discussion] ANN: Numpy 1.6.0 beta 2
Mark Wiebe
mwwiebe at gmail.com
Tue Apr 5 21:08:13 EDT 2011
On Tue, Apr 5, 2011 at 5:07 PM, Christoph Gohlke <cgohlke at uci.edu> wrote:
>
>
> On 4/5/2011 4:05 PM, Mark Wiebe wrote:
> > On Mon, Apr 4, 2011 at 9:10 PM, Christoph Gohlke <cgohlke at uci.edu
> > <mailto:cgohlke at uci.edu>> wrote:
> >
> >
> > <snip>
> >
> > A few numpy tests fail on win-amd64:
> >
> > <snip>
> >
> >
> ======================================================================
> > FAIL: test_iterator.test_iter_broadcasting_errors
> >
> ----------------------------------------------------------------------
> > Traceback (most recent call last):
> > File "X:\Python26-x64\lib\site-packages\nose\case.py", line 187,
> in
> > runTest
> > self.test(*self.arg)
> > File
> >
> "X:\Python26-x64\lib\site-packages\numpy\core\tests\test_iterator.py",
> > line 639, in test_iter_broadcasting_errors
> > 'Message "%s" doesn\'t contain operand shape (2,3)' % msg)
> > File "X:\Python26-x64\lib\site-packages\numpy\testing\utils.py",
> line
> > 34, in assert_
> > raise AssertionError(msg)
> > AssertionError: Message "non-broadcastable output operand with shape
> > (%lld,%lld)
> > doesn't match the broadcast shape (%lld,%lld,%lld)" doesn't contain
> > operand shape (2,3)
> >
> >
> > I've pushed a fix for this to the 1.6.x branch, can you confirm that it
> > works on win-amd64?
> >
> > Thanks,
> > Mark
> >
> > <snip>
> >
>
> Sorry, I forgot to mention that this test failed on 64-bit Python 2.6
> only. I now recognize it is due to a known issue with Python's
> PyErr_Format function <http://bugs.python.org/issue7228>. Unfortunately
> the fix will not be backported to Python 2.6. Maybe this test could be
> marked as known failure on win-amd64-py2.6?
>
> Could you please revert your changes or set the format specifier to
> "%lld"? "%I64d" is not supported by PyErr_Format.
>
This means PyString_Format and PyOS_snprintf support different sets of
formatting characters, which begs the question of which set of functions
should the NPY_*_FMT macros be intended for? Currently it looks like just
the NPY_INTP_FMT is used with PyString_Format/PyErr_Format, and the rest are
used with PyOS_snprintf. Also, in other places npy_intp variables are cast
to long and "%ld" is used instead of NPY_INTP_FMT. I suppose I'll just
change NPY_INTP_FMT unconditionally to "%lld" when it's long long, since
that's what the PyString_Format 2.7 documentation says is the correct
portable formatter.
-Mark
>
> Thanks,
>
> Christoph
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110405/dfe71400/attachment.html>
More information about the NumPy-Discussion
mailing list