errors=31 in scipy.test() with latest cvs versions of scipy and Numerical
Hi all, Using Numeric 24.0
scipy.__version__ '0.3.3_303.4599'
scipy.test() results in
======================================================================
ERROR: check_simple_todense (scipy.io.mmio.test_mmio.test_mmio_coordinate)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.3/site-packages/scipy/io/tests/test_mmio.py",
line 152, in check_simple_todense
b = mmread(fn).todense()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
254, in todense
csc = self.tocsc()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
1437, in tocsc
return csc_matrix(a, (rowa, ptra), M=self.shape[0], N=self.shape[1])
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_add (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_elmul (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_getelement (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_matmat (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_matvec (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_setelement (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_tocoo (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_tocsc (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_tocsr (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_todense (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_constructor1 (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_constructor2 (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_constructor3 (scipy.sparse.Sparse.test_Sparse.test_csc)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_add (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_elmul (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_getelement (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_matmat (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_matvec (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_setelement (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_tocoo (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_tocsc (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_tocsr (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_todense (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_constructor1 (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_constructor2 (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_constructor3 (scipy.sparse.Sparse.test_Sparse.test_csr)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 30, in setUp
self.datsp = self.spmatrix(self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
712, in __init__
ocsc = csc_matrix(transpose(s))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_elmul (scipy.sparse.Sparse.test_Sparse.test_dok)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 60, in check_elmul
c = a ** b
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
186, in __pow__
return csc ** other
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
485, in __pow__
return csc_matrix(c,(rowc,ptrc),M=M,N=N)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_matmat (scipy.sparse.Sparse.test_Sparse.test_dok)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 71, in check_matmat
assert_array_almost_equal((asp*bsp).todense(),dot(asp.todense(),bsp.todense()))
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
1184, in __mul__
return self.matmat(other)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
239, in matmat
res = csc.matmat(other)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
568, in matmat
return csc_matrix(c, (rowc, ptrc), M=M, N=N)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_tocoo (scipy.sparse.Sparse.test_Sparse.test_dok)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 75, in check_tocoo
assert_array_almost_equal(a.todense(),self.dat)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
254, in todense
csc = self.tocsc()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
1437, in tocsc
return csc_matrix(a, (rowa, ptra), M=self.shape[0], N=self.shape[1])
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
======================================================================
ERROR: check_mult (scipy.sparse.Sparse.test_Sparse.test_dok)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"/usr/lib/python2.3/site-packages/scipy/sparse/tests/test_Sparse.py",
line 155, in check_mult
D = A*A.T
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
1184, in __mul__
return self.matmat(other)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
239, in matmat
res = csc.matmat(other)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
568, in matmat
return csc_matrix(c, (rowc, ptrc), M=M, N=N)
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
357, in __init__
self._check()
File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line
375, in _check
if (nnz>0) and (max(self.rowind[:nnz]) >= M):
IndexError: invalid slice
----------------------------------------------------------------------
Ran 1173 tests in 3.113s
FAILED (errors=31)
On Wed, Apr 06, 2005 at 10:00:06AM +0200, Nils Wagner wrote:
Hi all,
Using Numeric 24.0
scipy.__version__ '0.3.3_303.4599'
scipy.test() results in
====================================================================== ERROR: check_simple_todense (scipy.io.mmio.test_mmio.test_mmio_coordinate) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/scipy/io/tests/test_mmio.py", line 152, in check_simple_todense b = mmread(fn).todense() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 254, in todense csc = self.tocsc() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 1437, in tocsc return csc_matrix(a, (rowa, ptra), M=self.shape[0], N=self.shape[1]) File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 357, in __init__ self._check() File "/usr/lib/python2.3/site-packages/scipy/sparse/Sparse.py", line 375, in _check if (nnz>0) and (max(self.rowind[:nnz]) >= M): IndexError: invalid slice
(etc. -- note to self: use scipy for regression testing :-) nnz is coming from nnz = self.indptr[-1] where self.indptr is an array of Int32. Hmm, this corresponds to the behaviour I just responded to Sebastien de Menten about. The problem is that nnz is *not* an Python integer; it's an array, so the slice fails. I think I was wrong in that email about saying this was expected behaviour :-) This comes from the recent fix of a[0,0] and a[0][0] returning the same type. Either change that back, or else we need to spruce up the slicing logic to consider 0-dimensional integer arrays as scalars. A minimal test case: a = Numeric.array([5,6,7,8]) b = Numeric.array([0,1,2,3], 'i') n = b[-1] assert a[:n] == 8 (I'm not tackling this right now) -- |>|\/|< /--------------------------------------------------------------------------\ |David M. Cooke http://arbutus.physics.mcmaster.ca/dmc/ |cookedm@physics.mcmaster.ca
participants (2)
-
David M. Cooke
-
Nils Wagner