[SciPy-user] special.round(10.5) [was: Installing SciPy on Mac OS X Tiger]

Fernando Perez Fernando.Perez at colorado.edu
Tue Jun 14 14:08:15 CDT 2005

Robert Kern wrote:

> It's an incorrect test, I believe.
> Other devs: special.round() has different behavior than scipy.round() 
> (which is just an alias to Numeric.around()).
> In [15]:scipy.round(10.5)
> Out[15]:11.0
> In [16]:scipy.round(11.5)
> Out[16]:12.0
> In [17]:scipy.special.round(10.5)
> Out[17]:10.0
> In [18]:scipy.special.round(11.5)
> Out[18]:12.0
> I submit that "round-to-nearest-even" is desirable (and in any case 
> comes part and parcel with using the cephes implementation), and we 
> should adjust our test case accordingly.
> Or rather, I already have.

Have you?  With a fresh CVS checkout, I still get this:

FAIL: check_round (scipy.special.basic.test_basic.test_round)
Traceback (most recent call last):
line 1789, in check_round
   File "/usr/lib/python2.3/site-packages/scipy_test/testing.py", line 
715, in assert_array_equal
     assert cond,\
Arrays are not equal (mismatch 25.0%):
         Array 1: [10 10 11 11]
         Array 2: [10 10 10 11]

Ran 1279 tests in 80.186s

FAILED (failures=1)

I was running with a clean checkout to see if my other weave-related 
changes didn't break anything, before I think about committing them.  It 
seems my stuff is OK, as this (not weave-related) remains the only 
failure after a level 10 test.



More information about the SciPy-user mailing list