[SciPy-user] Installation on dual opteron ...

Robert Kern rkern at ucsd.edu
Tue Sep 27 16:46:49 CDT 2005

Stephen Walton wrote:
> Arnd Baecker wrote:
>> scipy.test(10) gives:
>> ======================================================================
>> FAIL: check_round (scipy.special.basic.test_basic.test_round)
>> ----------------------------------------------------------------------
>> Traceback (most recent call last):
>>  File
>> "/scr/python3/lib/python2.4/site-packages/scipy/special/tests/test_basic.py",
>> line 1789, in check_round
>>    assert_array_equal(rnd,rndrl)
>>  File "/scr/python3/lib/python2.4/site-packages/scipy_test/testing.py",
>> line 715, in assert_array_equal
>>    assert cond,\
>> AssertionError:
>> Arrays are not equal (mismatch 25.0%):
>>        Array 1: [10 10 11 11]
>>        Array 2: [10 10 10 11]
> I'm getting this same error on my i386 systems using Absoft Fortran and
> Fedora Core 4, so this problem is not unique to the Opteron
> architecture.  I can't help with the X11 link problem, I'm afraid, as I
> don't see it on my i386 systems.

We've run into this several times before. The test is right according to
the documentation.

In [5]: round?
Type:           ufunc
String Form:    <ufunc 'round'>
Namespace:      Interactive
    y=Returns the nearest integer to x as a double precision
    floating point result.  If x ends in 0.5 exactly, the
    nearest even integer is chosen.

That's the round() from scipy.special which ought to be the one being
called by this check_round(). You might want to add a "print round"
statement to the check_round() method just to make sure that it is the
ufunc from scipy.special and not the alias to around() from Numeric
which follows Python's round-up-on-0.5 behavior.

The last time we came across it, I had Fernando check a C program that
tries the underlying Cephes routine, and it gives the expected answer.

Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
 Are the graves of dreams allowed to die."
  -- Richard Harter

More information about the SciPy-user mailing list