[SciPy-dev] Failures in current CVS version

Travis E. Oliphant oliphant at ee.byu.edu
Wed Oct 1 16:17:00 CDT 2003

Pearu Peterson wrote:
> On Wed, 1 Oct 2003, Pearu Peterson wrote:
>>Btw, I just run build scipy under Python 2.1 and there I get only one 
>>FAIL: check_arange (test_basic.test_arange)
>>Traceback (most recent call last):
>>  File 
>>line 474, in check_arange
>>    assert_array_equal(numstringa, array([3.,3.3,3.6,3.9]))
>>  File "/usr/lib/python2.1/site-packages/scipy_test/testing.py", line 390, 
>>in assert_array_equal
>>    assert alltrue(ravel(reduced)),\
>>Arrays are not equal:
> I investigated this a bit futher.. The problem was in Numeric.arange that
> have different implementations in versions 21.0 (that I have under Python 
> 2.1) and 23.1 (Python 2.3.1) and return a tiny bit different (but 
> noticable to above tests) results:

Stragely enough, I saw this error too and couldn't account for it 
because the implementation of arange hasn't changed between 21.0 and 
23.1 --- it shows that you shouldn't count on arange ending on exactly 
the float you expect if you are relying on float equality

e,g, 1/10.0 is not necessarily the same as 0.1  down to the last bit.


More information about the Scipy-dev mailing list