Corner case complex log error.

FAIL: test_umath.TestC99.test_clog(<ufunc 'log'>, (-0.0, -0.0), (-inf, -0.0), 'divide') ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.5/site-packages/nose/case.py", line 203, in runTest self.test(*self.arg) File "/usr/lib/python2.5/site-packages/numpy/core/tests/test_umath.py", line 393, in _check assert got == expected, (got, expected) AssertionError: ('(-inf, 3.1415926535897931)', '(-inf, 0.0)')

Tue, 22 Jul 2008 00:34:46 -0600, Charles R Harris wrote:
FAIL: test_umath.TestC99.test_clog(<ufunc 'log'>, (-0.0, -0.0), (-inf, -0.0), 'divide') AssertionError: ('(-inf, 3.1415926535897931)', '(-inf, 0.0)')
The interesting thing is that there is no test like this in test_umath.py. The closest thing is the second test in test_clog, which is (+0., 0.), (-inf, 0.). Does this vanish if you comment it out? -- Pauli Virtanen

On Tue, Jul 22, 2008 at 14:57, Pauli Virtanen <pav@iki.fi> wrote:
Tue, 22 Jul 2008 00:34:46 -0600, Charles R Harris wrote:
FAIL: test_umath.TestC99.test_clog(<ufunc 'log'>, (-0.0, -0.0), (-inf, -0.0), 'divide') AssertionError: ('(-inf, 3.1415926535897931)', '(-inf, 0.0)')
The interesting thing is that there is no test like this in test_umath.py. The closest thing is the second test in test_clog, which is (+0., 0.), (-inf, 0.). Does this vanish if you comment it out?
I think it's a weirdness in the way that Python can handle literals in the same statement.
(-0.0, 0.0) (-0.0, -0.0)
-- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco

Tue, 22 Jul 2008 15:13:09 -0500, Robert Kern wrote:
On Tue, Jul 22, 2008 at 14:57, Pauli Virtanen <pav@iki.fi> wrote:
Tue, 22 Jul 2008 00:34:46 -0600, Charles R Harris wrote:
FAIL: test_umath.TestC99.test_clog(<ufunc 'log'>, (-0.0, -0.0), (-inf, -0.0), 'divide') AssertionError: ('(-inf, 3.1415926535897931)', '(-inf, 0.0)')
The interesting thing is that there is no test like this in test_umath.py. The closest thing is the second test in test_clog, which is (+0., 0.), (-inf, 0.). Does this vanish if you comment it out?
I think it's a weirdness in the way that Python can handle literals in the same statement.
If so, it seems like a platform-dependent quirk: Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
(-0.0, 0.0) (-0.0, 0.0)
Anyway, I marked the probable culprit as skipped for now. -- Pauli Virtanen

On Tue, Jul 22, 2008 at 15:21, Pauli Virtanen <pav@iki.fi> wrote:
Tue, 22 Jul 2008 15:13:09 -0500, Robert Kern wrote:
On Tue, Jul 22, 2008 at 14:57, Pauli Virtanen <pav@iki.fi> wrote:
Tue, 22 Jul 2008 00:34:46 -0600, Charles R Harris wrote:
FAIL: test_umath.TestC99.test_clog(<ufunc 'log'>, (-0.0, -0.0), (-inf, -0.0), 'divide') AssertionError: ('(-inf, 3.1415926535897931)', '(-inf, 0.0)')
The interesting thing is that there is no test like this in test_umath.py. The closest thing is the second test in test_clog, which is (+0., 0.), (-inf, 0.). Does this vanish if you comment it out?
I think it's a weirdness in the way that Python can handle literals in the same statement.
If so, it seems like a platform-dependent quirk:
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
(-0.0, 0.0) (-0.0, 0.0)
Anyway, I marked the probable culprit as skipped for now.
We can define negzero=-0.0 at the top of the file and always use that. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco

On Tue, Jul 22, 2008 at 2:21 PM, Pauli Virtanen <pav@iki.fi> wrote:
Tue, 22 Jul 2008 15:13:09 -0500, Robert Kern wrote:
On Tue, Jul 22, 2008 at 14:57, Pauli Virtanen <pav@iki.fi> wrote:
Tue, 22 Jul 2008 00:34:46 -0600, Charles R Harris wrote:
FAIL: test_umath.TestC99.test_clog(<ufunc 'log'>, (-0.0, -0.0), (-inf, -0.0), 'divide') AssertionError: ('(-inf, 3.1415926535897931)', '(-inf, 0.0)')
The interesting thing is that there is no test like this in test_umath.py. The closest thing is the second test in test_clog, which is (+0., 0.), (-inf, 0.). Does this vanish if you comment it out?
I think it's a weirdness in the way that Python can handle literals in the same statement.
If so, it seems like a platform-dependent quirk:
Python 2.5.2 (r252:60911, Apr 21 2008, 11:12:42) [GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
(-0.0, 0.0) (-0.0, 0.0)
Anyway, I marked the probable culprit as skipped for now.
Or maybe a Python bug Python 2.5.1 (r251:54863, Jun 15 2008, 18:24:51) [GCC 4.3.0 20080428 (Red Hat 4.3.0-8)] on linux2 I doesn't show up in Python 2.3.7 either. Chuck
participants (3)
-
Charles R Harris
-
Pauli Virtanen
-
Robert Kern