[SciPy-dev] cephes.tandg test

Arnd Baecker arnd.baecker at web.de
Tue Jan 10 09:35:35 EST 2006


Hi,

all numpy/scipy tests pass on the Itanium2, apart from
the following error:

======================================================================
FAIL: check_tandg (scipy.special.basic.test_basic.test_cephes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File
"/home/baecker/python2/scipy_lintst_n_nothing/lib/python2.4/site-packages/scipy/special/tests/test_basic.py",
line 436, in check_tandg
    assert_equal(cephes.tandg(45),1.0)
  File
"/home/baecker/python2//scipy_lintst_n_nothing/lib/python2.4/site-packages/numpy/testing/utils.py",
line 81, in assert_equal
    assert desired == actual, msg
AssertionError:
Items are not equal:
DESIRED: 1.0
ACTUAL: 1.0000000000000002
----------------------------------------------------------------------

The is caused by the strict equality test:

    def check_tandg(self):
        assert_equal(cephes.tandg(45),1.0)

Is there a reason, why one should get 1.0 up to the last bit?
If not an `assert_almost_equal` might be more appropriate?

Best, Arnd




More information about the SciPy-Dev mailing list