[SciPy-user] Bugs in SciPy/Numeric on Mac OS X
Andrew Nesbit
alnesbit at students.cs.mu.OZ.AU
Thu Jul 10 06:39:15 EDT 2003
For the information of the list... I've been investigating the cause
of several scipy.test(level=1) failures on my Mac OS X machine. In
particular, there a few fails that are like this:
======================================================================
FAIL: check_nd (test_function_base.test_all)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python/scipy_base/tests/test_function_base.py",
line 42, in check_nd
assert_array_equal(all(y1),[0,0,1])
File "/usr/local/lib/python/scipy_test/testing.py", line 390, in
assert_array_equal
assert alltrue(ravel(reduced)),\
AssertionError:
Arrays are not equal:
======================================================================
FAIL: check_nd (test_function_base.test_any)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python/scipy_base/tests/test_function_base.py",
line 25, in check_nd
assert_array_equal(any(y1),[1,1,0])
File "/usr/local/lib/python/scipy_test/testing.py", line 390, in
assert_array_equal
assert alltrue(ravel(reduced)),\
AssertionError:
Arrays are not equal:
I've tracked them down to the sometrue() and alltrue() functions in
/usr/local/lib/python/Numeric/Numeric.py . It seems that the return
values of these functions, given by logical_or() and logical_and(),
return incorrect results. For example:
>>> scipy.logical_or([0, 1, 1], [0, 1, 1])
array([ 0, 16777216, 16777216])
when the result /should/ have values of 1 in the "true" positions, and
that seems to be why the tests are failing.
I've submitted a bug report to the NumPy Sourceforge bug tracking
system.
Just letting you all know.
Andrew.
More information about the SciPy-User
mailing list