[SciPy-user] Error and fail on test

Robert Kern robert.kern@gmail....
Mon Jan 28 11:13:33 CST 2008


Ilmar Wilbers wrote:
> Hello,
> 
> Thank you, that worked. It did see that fix, but I thought it was part 
> of version 0.6.0.
> 
> Now I have another problem, I get the following error:
> ======================================================================
> FAIL: check_x_stride (scipy.linalg.tests.test_fblas.test_cgemv)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>    File 
> "/Users/ilmarw/ext/Darwin/lib/python2.5/site-packages/scipy/linalg/tests/test_fblas.py", 
> line 343, in check_x_stride
>      assert_array_almost_equal(desired_y,y)
>    File 
> "/Users/ilmarw/ext/Darwin/lib/python2.5/site-packages/numpy/testing/utils.py", 
> line 232, in assert_array_almost_equal
>      header='Arrays are not almost equal')
>    File 
> "/Users/ilmarw/ext/Darwin/lib/python2.5/site-packages/numpy/testing/utils.py", 
> line 217, in assert_array_compare
>      assert cond, msg
> AssertionError:
> Arrays are not almost equal
> 
> (mismatch 33.3333333333%)
>   x: array([  8.31392193 -8.31392193j, -14.72563744+16.72563744j,
>         -13.49905777+17.49905777j], dtype=complex64)
>   y: array([  8.31392193 -8.31392193j, -14.72563744+16.72563553j,
>         -13.49905777+17.49905777j], dtype=complex64)
> 
> ----------------------------------------------------------------------
> Ran 1719 tests in 4.717s
> 
> FAILED (failures=1)
> Out[2]: <unittest._TextTestResult run=1719 errors=0 failures=1>
> 
> The weird thing is, the two arrays (x and y) are the same. Any thought, 
> someone?

They're not. The imaginary components of the second elements are slightly 
different. It's possible that the tolerance should be relaxed (not all 
accelerated BLASes use fully IEEE-754 compliant arithmetic), but this probably 
requires more investigation.

-- 
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


More information about the SciPy-user mailing list