Hello, Building the current CVS version of SciPy and running
python -c "import scipy ; scipy.test(2)"
I get . ====================================================================== ERROR: check_integer (test_array_import.test_read_array) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/io/tests/test_array_import.py", line 61, in check_integer a = stats.randint(1,20,size=(3,4)) AttributeError: 'module' object has no attribute 'randint' ====================================================================== FAIL: check_pro_ang1_cv (test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/test_basic.py", line 357, in check_pro_ang1_cv assert_equal(cephes.pro_ang1_cv(1,1,1,1,0),(1.0,0.0)) File "/usr/local/lib/python2.3/site-packages/scipy_test/testing.py", line 332, in assert_equal assert desired == actual, msg AssertionError: Items are not equal: DESIRED: (1.0, 0.0) ACTUAL: (0.99999999999999989, 0.0) ---------------------------------------------------------------------- on my SuSE 8.2 system with gcc 3.3 on a AMD Athlon(tm) XP 2000+. on install I found the messages: ... File "/usr/local/lib/python2.3/site-packages/kiva/agg/graphics_context.swig.py", line 1 %pythoncode { ^ SyntaxError: invalid syntax ... File "/usr/local/lib/python2.3/site-packages/kiva/agg/graphics_context.py", line 1 %pythoncode { ^ SyntaxError: invalid syntax ... /usr/local/lib/python2.3/site-packages/kiva/wxfast.py:149: SyntaxWarning: import * only allowed at module level def calc_points(self): ... Regards, Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad.
On Wed, 1 Oct 2003, Berthold Höllmann wrote:
Building the current CVS version of SciPy and running
python -c "import scipy ; scipy.test(2)" . ====================================================================== ERROR: check_integer (test_array_import.test_read_array)
Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/io/tests/test_array_import.py", line 61, in check_integer a = stats.randint(1,20,size=(3,4)) AttributeError: 'module' object has no attribute 'randint'
Hmm, I fixed this about 50min ago in CVS.
====================================================================== FAIL: check_pro_ang1_cv (test_basic.test_cephes) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.3/site-packages/scipy/special/tests/test_basic.py", line 357, in check_pro_ang1_cv assert_equal(cephes.pro_ang1_cv(1,1,1,1,0),(1.0,0.0)) File "/usr/local/lib/python2.3/site-packages/scipy_test/testing.py", line 332, in assert_equal assert desired == actual, msg AssertionError: Items are not equal: DESIRED: (1.0, 0.0) ACTUAL: (0.99999999999999989, 0.0)
What ATLAS version are you using?
on install I found the messages:
... File "/usr/local/lib/python2.3/site-packages/kiva/agg/graphics_context.swig.py", line 1 %pythoncode { ^ SyntaxError: invalid syntax
That's a known issue but has no harm on using scipy. Btw, I just run build scipy under Python 2.1 and there I get only one failure: ====================================================================== FAIL: check_arange (test_basic.test_arange) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.1/site-packages/scipy/special/tests/test_basic.py", 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)),\ AssertionError: Arrays are not equal: Pearu
On Wed, 1 Oct 2003, Pearu Peterson wrote:
Btw, I just run build scipy under Python 2.1 and there I get only one failure: ====================================================================== FAIL: check_arange (test_basic.test_arange) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.1/site-packages/scipy/special/tests/test_basic.py", 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)),\ AssertionError: 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: Python 2.1.3+ (#1, Jul 5 2003, 00:42:30) [GCC 3.3.1 20030626 (Debian prerelease)] on linux2 Type "copyright", "credits" or "license" for more information.
import Numeric Numeric.__version__ '21.0' Numeric.arange(3,4,.3)[-1] 3.8999999999999995
Python 2.3.1 (#2, Sep 27 2003, 12:44:22) [GCC 3.3.2 20030908 (Debian prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information.
import Numeric Numeric.__version__ '23.1' Numeric.arange(3,4,.3)[-1] 3.8999999999999999
On the other hand, why Numeric.arange is tested under scipy.special anyway? I'd remove it from special/test_basic.py. Any objections? Pearu
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 failure: ====================================================================== FAIL: check_arange (test_basic.test_arange) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/local/lib/python2.1/site-packages/scipy/special/tests/test_basic.py", 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)),\ AssertionError: 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. -Travis
On Wed, 1 Oct 2003, Travis E. Oliphant wrote:
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
Numeric 21.0 was released 12Feb2002 but the arange implementation changed between multiarraymodule.c revisions 1.28 and 1.29,1.30 dated around 25Mar2002. See http://cvs.sourceforge.net/viewcvs.py/numpy/Numerical/Src/multiarraymodule.c That was Travis O. who commited these changes;-)
--- it shows that you shouldn't count on arange ending on exactly the float you expect if you are relying on float equality
I think the new arange implementation fixed this, or at least, as well as possible.
e,g, 1/10.0 is not necessarily the same as 0.1 down to the last bit.
This is not completely true, 0.1 and 1/10.0 happen to be exactly the same floats:-)
'%.24e' % (1/10.0) '1.000000000000000055511151e-01' '%.24e' % (0.1) '1.000000000000000055511151e-01'
but in general I agree that different ways to compute a floating point number may have a bit different results. Pearu
Pearu Peterson <pearu@scipy.org> writes:
On Wed, 1 Oct 2003, Berthold Höllmann wrote:
...
Items are not equal: DESIRED: (1.0, 0.0) ACTUAL: (0.99999999999999989, 0.0)
What ATLAS version are you using?
/usr/local/bin/python -c "import atlas_version" ATLAS version 3.4.1
on install I found the messages:
... File "/usr/local/lib/python2.3/site-packages/kiva/agg/graphics_context.swig.py", line 1 %pythoncode { ^ SyntaxError: invalid syntax
That's a known issue but has no harm on using scipy.
But when you try to upgrade Python with the same minor version number (e.g. 2.3->2.3.1) the installation processes fails because it tries to compile all .py files and the it fails on these. The problem is hard to find because the compilation process does not abort immidiately but only after all pending file are handeled, so you have to scroll through lots of output
... Regards, Berthold -- bhoel@web.de / http://starship.python.net/crew/bhoel/ It is unlawful to use this email address for unsolicited ads (USC Title 47 Sec.227). I will assess a US$500 charge for reviewing and deleting each unsolicited ad.
participants (3)
-
bhoel@web.de -
Pearu Peterson -
Travis E. Oliphant