Thanks to visit codestin.com
Credit goes to github.com

Skip to content

test_umath_complex failures with Windows XP & Migw32 (Trac #1461) #2058

Closed
@thouis

Description

@thouis

Original ticket http://projects.scipy.org/numpy/ticket/1461 on 2010-04-23 by @drnlm, assigned to unknown.

From the windows buildbot

Windows XP, python 2.5, mingw32

======================================================================
FAIL: test_umath_complex.TestCexp.test_special_values(<ufunc 'exp'>, 1.#INF, 0, 1.#INF, 0)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Python25\Lib\site-packages\nose\case.py", line 186, in runTest
    self.test(*self.arg)
  File "C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy\core\tests\test_umath_complex.py", line 539, in check_complex_value
    assert_equal(f(z1), z2)
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 256, in assert_equal
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 686, in assert_array_equal
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 596, in assert_array_compare
AssertionError: 
Arrays are not equal

(x and y nan location mismatch [ True], False mismatch)
 x: array([ Inf NaNj])
 y: array((1.#INF+0j))


======================================================================
FAIL: test_umath_complex.TestCexp.test_special_values(None,)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Python25\Lib\site-packages\nose\case.py", line 186, in runTest
    self.test(*self.arg)
  File "C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy\core\tests\test_umath_complex.py", line 60, in _check_ninf_inf
    raise AssertionError(msgform %(z.real, z.imag))
AssertionError: cexp(-inf, inf) is (-1.#IND00, -1.#IND00), expected (+-0, +-0)
>>  raise AssertionError('cexp(-inf, inf) is (%f, %f), expected (+-0, +-0)' %((nan+nanj).real, (nan+nanj).imag))


======================================================================
FAIL: test_umath_complex.TestCexp.test_special_values(None,)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Python25\Lib\site-packages\nose\case.py", line 186, in runTest
    self.test(*self.arg)
  File "C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy\core\tests\test_umath_complex.py", line 73, in _check_inf_inf
    raise AssertionError(msgform % (z.real, z.imag))
AssertionError: cexp(inf, inf) is (-1.#IND00, -1.#IND00), expected (+-inf, nan)
>>  raise AssertionError('cexp(inf, inf) is (%f, %f), expected (+-inf, nan)' % ((nan+nanj).real, (nan+nanj).imag))


======================================================================
FAIL: test_umath_complex.TestCexp.test_special_values(None,)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Python25\Lib\site-packages\nose\case.py", line 186, in runTest
    self.test(*self.arg)
  File "C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy\core\tests\test_umath_complex.py", line 86, in _check_ninf_nan
    raise AssertionError(msgform % (z.real, z.imag))
AssertionError: cexp(-inf, nan) is (1.#QNAN0, 1.#QNAN0), expected (+-0, +-0)
>>  raise AssertionError('cexp(-inf, nan) is (%f, %f), expected (+-0, +-0)' % ((nan+nanj).real, (nan+nanj).imag))


======================================================================
FAIL: test_umath_complex.TestCexp.test_special_values(None,)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Python25\Lib\site-packages\nose\case.py", line 186, in runTest
    self.test(*self.arg)
  File "C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy\core\tests\test_umath_complex.py", line 99, in _check_inf_nan
    raise AssertionError(msgform % (z.real, z.imag))
AssertionError: cexp(-inf, nan) is (1.#QNAN0, 1.#QNAN0), expected (+-inf, nan)
>>  raise AssertionError('cexp(-inf, nan) is (%f, %f), expected (+-inf, nan)' % ((nan+nanj).real, (nan+nanj).imag))


======================================================================
FAIL: test_special_values (test_umath_complex.TestClog)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy\core\tests\test_umath_complex.py", line 144, in test_special_values
    self.assertRaises(FloatingPointError, np.log, x)
AssertionError: FloatingPointError not raised
    if hasattr(excClass,'__name__'): 'FloatingPointError' = excClass.'unittest'
    else: 'FloatingPointError' = str(excClass)
>>  raise self.failureException, "%s not raised" % 'FloatingPointError'


======================================================================
FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, 1, 1.#INF, 1.#INF, 1.#INF)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Python25\Lib\site-packages\nose\case.py", line 186, in runTest
    self.test(*self.arg)
  File "C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy\core\tests\test_umath_complex.py", line 539, in check_complex_value
    assert_equal(f(z1), z2)
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 256, in assert_equal
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 686, in assert_array_equal
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 596, in assert_array_compare
AssertionError: 
Arrays are not equal

(x and y nan location mismatch [ True], False mismatch)
 x: array([ Inf NaNj])
 y: array((1.#INF+1.#INFj))


======================================================================
FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -1, 1.#INF, 1.#INF, 1.#INF)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Python25\Lib\site-packages\nose\case.py", line 186, in runTest
    self.test(*self.arg)
  File "C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy\core\tests\test_umath_complex.py", line 539, in check_complex_value
    assert_equal(f(z1), z2)
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 256, in assert_equal
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 686, in assert_array_equal
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 596, in assert_array_compare
AssertionError: 
Arrays are not equal

(x and y nan location mismatch [ True], False mismatch)
 x: array([ NaN Infj])
 y: array((1.#INF+1.#INFj))


======================================================================
FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, 1.#INF, 1.#INF, 1.#INF, 1.#INF)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Python25\Lib\site-packages\nose\case.py", line 186, in runTest
    self.test(*self.arg)
  File "C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy\core\tests\test_umath_complex.py", line 539, in check_complex_value
    assert_equal(f(z1), z2)
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 256, in assert_equal
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 686, in assert_array_equal
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 596, in assert_array_compare
AssertionError: 
Arrays are not equal

(x and y nan location mismatch [ True], False mismatch)
 x: array([ Inf NaNj])
 y: array((1.#INF+1.#INFj))


======================================================================
FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -1.#INF, 1.#INF, 1.#INF, 1.#INF)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Python25\Lib\site-packages\nose\case.py", line 186, in runTest
    self.test(*self.arg)
  File "C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy\core\tests\test_umath_complex.py", line 539, in check_complex_value
    assert_equal(f(z1), z2)
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 256, in assert_equal
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 686, in assert_array_equal
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 596, in assert_array_compare
AssertionError: 
Arrays are not equal

(x and y nan location mismatch [ True], False mismatch)
 x: array([ NaN Infj])
 y: array((1.#INF+1.#INFj))


======================================================================
FAIL: test_umath_complex.TestCsqrt.test_special_values(<ufunc 'sqrt'>, -1.#IND, 1.#INF, 1.#INF, 1.#INF)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Python25\Lib\site-packages\nose\case.py", line 186, in runTest
    self.test(*self.arg)
  File "C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy\core\tests\test_umath_complex.py", line 539, in check_complex_value
    assert_equal(f(z1), z2)
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 256, in assert_equal
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 686, in assert_array_equal
  File "..\numpy-install25\Lib\site-packages\numpy\testing\utils.py", line 596, in assert_array_compare
AssertionError: 
Arrays are not equal

(x and y nan location mismatch [ True], False mismatch)
 x: array([ NaN NaNj])
 y: array((1.#INF+1.#INFj))


======================================================================
FAIL: test_umath_complex.TestCsqrt.test_special_values(None,)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "c:\Python25\Lib\site-packages\nose\case.py", line 186, in runTest
    sRunning unit tests for numpy
NumPy version 2.0.0.dev8351
NumPy is installed in C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy
Python version 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)]
nose version 0.11.2
elf.test(*self.arg)
  File "C:\buildbot\numpy\b11\numpy-install25\Lib\site-packages\numpy\core\tests\test_umath_complex.py", line 340, in _check_ninf_nan
    raise AssertionError(msgform % (z.real, z.imag))
AssertionError: csqrt(-inf, nan) is (1.#QNAN0, 1.#QNAN0), expected (nan, +-inf)
>>  raise AssertionError('csqrt(-inf, nan) is (%f, %f), expected (nan, +-inf)' % ((nan+nanj).real, (nan+nanj).imag))

The weird output formatting appears to be a long standing issue, (see #1463 for example), but the results are clearly not what was expected.

Similar failures seen when using python 2.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions