[Numpy-discussion] Solaris atan2 differences
mdroe at stsci.edu
Wed Nov 11 16:03:30 EST 2009
There are a set of three unit test failures on Solaris all related to
differences in the atan2 implementation, reported as bugs 1201, 1202 and
They boil down to the following three differences between Solaris (C
compiler 5.3) and "other" platforms -- when I say "other" I mean at
least Linux x86 and x86_64, and Mac OS X x86.
>>> import numpy as np
>>> import numpy.core.umath as ncu
>>> ncu.arctan2(np.PZERO, np.NZERO)
0.0 (Solaris) 3.1415926535897931 (other)
>>> ncu.arctan2(np.NZERO, np.NZERO)
0.0 (Solaris) -3.1415926535897931 (other)
>>> np.signbit(ncu.arctan2(np.NZERO, np.PZERO))
False (Solaris) True (other)
The easy fix seems to be to force it to use the npy_math version of
atan2 on Solaris (as we already do for MS Windows). (Patch attached).
Indeed this fixes the unit tests. Does that seem right?
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the NumPy-Discussion