[SciPy-dev] signbit and -inf

Arnd Baecker arnd.baecker at web.de
Sun Oct 16 16:06:16 EDT 2005



On Sun, 16 Oct 2005, Darren Dale wrote:

> I tried testing the svn new_core this morning, and get three error messages,
> each ultimately caused by signbit(-inf) returning False instead of True. Has
> anyone else observed this?
>
> Darren
>
> test(level=1, verbosity=0)
> ======================================================================
> FAIL: check_generic (scipy.base.type_check.test_type_check.test_isneginf)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/scipy/base/tests/test_type_check.py",
> line 193, in check_generic
>     assert(vals[0] == 1)
> AssertionError
>
> ======================================================================
> FAIL: check_generic (scipy.base.type_check.test_type_check.test_isposinf)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/scipy/base/tests/test_type_check.py",
> line 186, in check_generic
>     assert(vals[0] == 0)
> AssertionError
>
> ======================================================================
> FAIL: check_generic (scipy.base.type_check.test_type_check.test_nan_to_num)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/python2.4/site-packages/scipy/base/tests/test_type_check.py",
> line 200, in check_generic
>     assert_all(vals[0] < -1e10) and assert_all(isfinite(vals[0]))
>   File "/usr/lib/python2.4/site-packages/scipy/base/tests/test_type_check.py",
> line 12, in assert_all
>     assert(all(x)), x
> AssertionError: False
>
> ----------------------------------------------------------------------
> Ran 135 tests in 0.211s

I don't see those (they are marked as ok), but:

======================================================================
ERROR: test_basic (scipy.base.matrix.test_matrix.test_algebra)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/abaecker/BUILDS2/Build_27/inst_scipy_newcore/lib/python2.4/site-packages/scipy/base/tests/test_matrix.py",
line 60, in test_basic
    Ainv = linalg.inv(A)
  File
"/home/abaecker/BUILDS2/Build_27//inst_scipy_newcore/lib/python2.4/site-packages/scipy/linalg/basic.py",
line 189, in inv
    getrf,getri = get_lapack_funcs(('getrf','getri'),(a1,))
  File
"/home/abaecker/BUILDS2/Build_27//inst_scipy_newcore/lib/python2.4/site-packages/scipy/linalg/lapack.py",
line 41, in get_lapack_funcs
    t = arrays[i].typecode()
AttributeError: 'scipy.ndarray' object has no attribute 'typecode'

======================================================================
ERROR: test_basic (scipy.base.matrix.test_matrix.test_properties)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/abaecker/BUILDS2/Build_27/inst_scipy_newcore/lib/python2.4/site-packages/scipy/base/tests/test_matrix.py",
line 36, in test_basic
    assert allclose(linalg.inv(A), mA.I)
  File
"/home/abaecker/BUILDS2/Build_27//inst_scipy_newcore/lib/python2.4/site-packages/scipy/linalg/basic.py",
line 189, in inv
    getrf,getri = get_lapack_funcs(('getrf','getri'),(a1,))
  File
"/home/abaecker/BUILDS2/Build_27//inst_scipy_newcore/lib/python2.4/site-packages/scipy/linalg/lapack.py",
line 41, in get_lapack_funcs
    t = arrays[i].typecode()
AttributeError: 'scipy.ndarray' object has no attribute 'typecode'

----------------------------------------------------------------------
Ran 129 tests in 0.071s

FAILED (errors=2)
Out[4]: <unittest.TextTestRunner object at 0x2aaab20cf450>

For `scipy.base.test(1)` with
In [5]: scipy.base.__version__
Out[5]: '0.4.3.1293'

(For the full test, scipy.test(1,verbosity=10) I get,
as mentioned before a segfault).

Best, Arnd




More information about the SciPy-Dev mailing list