[SciPy-Dev] Scipy failures with 0.9.0.dev6859

Bruce Southey bsouthey@gmail....
Mon Nov 8 09:53:01 CST 2010


Hi,
Having upgraded to Fedora 14, I had to reinstall everything. I am 
getting various scipy failures across Python versions.
test_ndimage.TestNdimage.test_gauss03 (FAIL: gaussian filter 3)
test_ncg (test_optimize.TestOptimize) (FAIL: line-search Newton 
conjugate gradient optimization routine)

I know that first was been previously mentioned such as by Vincent in 
the OS X/Python 2.7  thread
   (http://permalink.gmane.org/gmane.comp.python.scientific.user/26891)

The second test appears to vary between versions as test code (section 
given next) appears to refer to scipy versions. Since I don't understand 
this area, could the test be written not to depend on on the version?

         # Ensure that function call counts are 'known good'; these are from
         # Scipy 0.7.0. Don't allow them to increase.
         assert_(self.funccalls == 7, self.funccalls)
         assert_(self.gradcalls == 18, self.gradcalls) # 0.8.0
         #assert_(self.gradcalls == 22, self.gradcalls) # 0.7.0


Python 2.4 also has multiple errors with these lines in common:

   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
706, in readsav
     r = _read_record(f)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
341, in _read_record
     rectypedesc['array_desc'])
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
294, in _read_array
     dims = array_desc['dims'][:array_desc['ndims']]
TypeError: slice indices must be integers or None

Bruce

$ python -c "import scipy; scipy.test()"
Running unit tests for scipy
NumPy version 2.0.0.dev
NumPy is installed in /usr/lib64/python2.7/site-packages/numpy
SciPy version 0.9.0.dev6859
SciPy is installed in /usr/lib64/python2.7/site-packages/scipy
Python version 2.7 (r27:82500, Sep 16 2010, 18:02:00) [GCC 4.5.1 
20100907 (Red Hat 4.5.1-3)]
nose version 0.11.2
[snip]
======================================================================
FAIL: test_ndimage.TestNdimage.test_gauss03
gaussian filter 3
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/usr/lib/python2.7/site-packages/nose-0.11.2-py2.7.egg/nose/case.py", 
line 186, in runTest
     self.test(*self.arg)
   File 
"/usr/lib64/python2.7/site-packages/scipy/ndimage/tests/test_ndimage.py", line 
468, in test_gauss03
     assert_almost_equal(output.sum(), input.sum())
   File "/usr/lib64/python2.7/site-packages/numpy/testing/utils.py", 
line 463, in assert_almost_equal
     raise AssertionError(msg)
AssertionError:
Arrays are not almost equal
  ACTUAL: 49993304.0
  DESIRED: 49992896.0

======================================================================
FAIL: test_ncg (test_optimize.TestOptimize)
line-search Newton conjugate gradient optimization routine
----------------------------------------------------------------------
Traceback (most recent call last):
   File 
"/usr/lib64/python2.7/site-packages/scipy/optimize/tests/test_optimize.py", 
line 177, in test_ncg
     assert_(self.gradcalls == 18, self.gradcalls) # 0.8.0
   File "/usr/lib64/python2.7/site-packages/numpy/testing/utils.py", 
line 34, in assert_
     raise AssertionError(msg)
AssertionError: 16

----------------------------------------------------------------------
Ran 4776 tests in 41.348s

FAILED (KNOWNFAIL=13, SKIP=34, failures=2)

Python2.4 errors

======================================================================
ERROR: test_idl.TestArrayDimensions.test_2d
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/usr/local/lib/python2.4/site-packages/nose/case.py", line 186, 
in runTest
     self.test(*self.arg)
   File 
"/usr/local/lib/python2.4/site-packages/scipy/io/tests/test_idl.py", 
line 133, in test_2d
     s = readsav(path.join(DATA_PATH, 'array_float32_2d.sav'), 
verbose=False)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
706, in readsav
     r = _read_record(f)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
341, in _read_record
     rectypedesc['array_desc'])
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
294, in _read_array
     dims = array_desc['dims'][:array_desc['ndims']]
TypeError: slice indices must be integers or None

======================================================================
ERROR: test_idl.TestArrayDimensions.test_3d
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/usr/local/lib/python2.4/site-packages/nose/case.py", line 186, 
in runTest
     self.test(*self.arg)
   File 
"/usr/local/lib/python2.4/site-packages/scipy/io/tests/test_idl.py", 
line 137, in test_3d
     s = readsav(path.join(DATA_PATH, 'array_float32_3d.sav'), 
verbose=False)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
706, in readsav
     r = _read_record(f)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
341, in _read_record
     rectypedesc['array_desc'])
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
294, in _read_array
     dims = array_desc['dims'][:array_desc['ndims']]
TypeError: slice indices must be integers or None

======================================================================
ERROR: test_idl.TestArrayDimensions.test_4d
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/usr/local/lib/python2.4/site-packages/nose/case.py", line 186, 
in runTest
     self.test(*self.arg)
   File 
"/usr/local/lib/python2.4/site-packages/scipy/io/tests/test_idl.py", 
line 141, in test_4d
     s = readsav(path.join(DATA_PATH, 'array_float32_4d.sav'), 
verbose=False)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
706, in readsav
     r = _read_record(f)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
341, in _read_record
     rectypedesc['array_desc'])
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
294, in _read_array
     dims = array_desc['dims'][:array_desc['ndims']]
TypeError: slice indices must be integers or None

======================================================================
ERROR: test_idl.TestArrayDimensions.test_5d
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/usr/local/lib/python2.4/site-packages/nose/case.py", line 186, 
in runTest
     self.test(*self.arg)
   File 
"/usr/local/lib/python2.4/site-packages/scipy/io/tests/test_idl.py", 
line 145, in test_5d
     s = readsav(path.join(DATA_PATH, 'array_float32_5d.sav'), 
verbose=False)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
706, in readsav
     r = _read_record(f)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
341, in _read_record
     rectypedesc['array_desc'])
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
294, in _read_array
     dims = array_desc['dims'][:array_desc['ndims']]
TypeError: slice indices must be integers or None

======================================================================
ERROR: test_idl.TestArrayDimensions.test_6d
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/usr/local/lib/python2.4/site-packages/nose/case.py", line 186, 
in runTest
     self.test(*self.arg)
   File 
"/usr/local/lib/python2.4/site-packages/scipy/io/tests/test_idl.py", 
line 149, in test_6d
     s = readsav(path.join(DATA_PATH, 'array_float32_6d.sav'), 
verbose=False)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
706, in readsav
     r = _read_record(f)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
341, in _read_record
     rectypedesc['array_desc'])
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
294, in _read_array
     dims = array_desc['dims'][:array_desc['ndims']]
TypeError: slice indices must be integers or None

======================================================================
ERROR: test_idl.TestArrayDimensions.test_7d
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/usr/local/lib/python2.4/site-packages/nose/case.py", line 186, 
in runTest
     self.test(*self.arg)
   File 
"/usr/local/lib/python2.4/site-packages/scipy/io/tests/test_idl.py", 
line 153, in test_7d
     s = readsav(path.join(DATA_PATH, 'array_float32_7d.sav'), 
verbose=False)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
706, in readsav
     r = _read_record(f)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
341, in _read_record
     rectypedesc['array_desc'])
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
294, in _read_array
     dims = array_desc['dims'][:array_desc['ndims']]
TypeError: slice indices must be integers or None

======================================================================
ERROR: test_idl.TestArrayDimensions.test_8d
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/usr/local/lib/python2.4/site-packages/nose/case.py", line 186, 
in runTest
     self.test(*self.arg)
   File 
"/usr/local/lib/python2.4/site-packages/scipy/io/tests/test_idl.py", 
line 157, in test_8d
     s = readsav(path.join(DATA_PATH, 'array_float32_8d.sav'), 
verbose=False)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
706, in readsav
     r = _read_record(f)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
341, in _read_record
     rectypedesc['array_desc'])
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
294, in _read_array
     dims = array_desc['dims'][:array_desc['ndims']]
TypeError: slice indices must be integers or None

======================================================================
ERROR: test_idl.TestCompressed.test_compressed
----------------------------------------------------------------------
Traceback (most recent call last):
   File "/usr/local/lib/python2.4/site-packages/nose/case.py", line 186, 
in runTest
     self.test(*self.arg)
   File 
"/usr/local/lib/python2.4/site-packages/scipy/io/tests/test_idl.py", 
line 114, in test_compressed
     s = readsav(path.join(DATA_PATH, 'various_compressed.sav'), 
verbose=False)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
706, in readsav
     r = _read_record(f)
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
341, in _read_record
     rectypedesc['array_desc'])
   File "/usr/local/lib/python2.4/site-packages/scipy/io/idl.py", line 
294, in _read_array
     dims = array_desc['dims'][:array_desc['ndims']]
TypeError: slice indices must be integers or None





More information about the SciPy-Dev mailing list