[Numpy-discussion] numpy.sqrt behaving differently on MacOS Lion

Ralf Gommers ralf.gommers at googlemail.com
Wed Jul 27 13:58:29 EDT 2011


On Wed, Jul 27, 2011 at 7:17 PM, Ilan Schnell <ischnell at enthought.com>wrote:

> MacOS Lion:
> >>> numpy.sqrt([complex(numpy.nan, numpy.inf)])
> array([ nan+infj])
>
> Other all system:
> array([ inf+infj])
>
> This causes a few numpy tests to fail on Lion.  The numpy
> was not compiled using the new LLVM based gcc, it is the
> same numpy binary I used on other MacOS systems, which
> was compiled using gcc-4.0.1.  However on Lion it is linked
> to Lions LLVM based gcc runtime, which apparently has some
> different behavior when it comes to such strange complex
> values.
>
> These type of complex corner cases fail on several other platforms, there
they are marked as skipped. I propose not to start changing this yet - the
compiler change is causing problems with scipy (
http://projects.scipy.org/scipy/ticket/1476) and it's not yet clear what the
recommended build setup on Lion should be.

Regarding binaries, it may be better to distribute separate ones for each
version of OS X from numpy 1.7 / 2.0 (we already do for python 2.7). In that
case this particular failure will not occur.

Cheers,
Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110727/377412a9/attachment.html>


More information about the NumPy-Discussion mailing list