[SciPy-dev] sparsetools - new and (hopefully) improved!

Tim Leslie tim.leslie at gmail.com
Sat Jan 6 03:10:55 EST 2007


On 1/6/07, Nathan Bell <wnbell at gmail.com> wrote:
> On 1/6/07, Tim Leslie <tim.leslie at gmail.com> wrote:>
> > Hi Nathan,
> >
> > I've grabbed your code from svn (thanks for putting it in!) but I'm
> > having a bit of a problem with the tests. Running scipy.tests()
> > results in 83 test failures, for example:
>
> > >>> dir(scipy.sparse.sparsetools)
> > ['__doc__', '__file__', '__name__', '__version__', 'ccootocsc',
> > 'ccscadd', 'ccscextract', 'ccscgetel', 'ccscmucsc', 'ccscmucsr',
> > 'ccscmul', 'ccscmux', 'ccscsetel', 'ccsctocoo', 'ccsctofull',
> > 'ccsrmucsc', 'ccsrmux', 'cdiatocsc', 'cfulltocsc', 'ctransp',
> > 'dcootocsc', 'dcscadd', 'dcscextract', 'dcscgetel', 'dcscmucsc',
> > 'dcscmucsr', 'dcscmul', 'dcscmux', 'dcscsetel', 'dcsctocoo',
> > 'dcsctofull', 'dcsrmucsc', 'dcsrmux', 'ddiatocsc', 'dfulltocsc',
> > 'dtransp', 'scootocsc', 'scscadd', 'scscextract', 'scscgetel',
> > 'scscmucsc', 'scscmucsr', 'scscmul', 'scscmux', 'scscsetel',
> > 'scsctocoo', 'scsctofull', 'scsrmucsc', 'scsrmux', 'sdiatocsc',
> > 'sfulltocsc', 'stransp', 'zcootocsc', 'zcscadd', 'zcscextract',
> > 'zcscgetel', 'zcscmucsc', 'zcscmucsr', 'zcscmul', 'zcscmux',
> > 'zcscsetel', 'zcsctocoo', 'zcsctofull', 'zcsrmucsc', 'zcsrmux',
> > 'zdiatocsc', 'zfulltocsc', 'ztransp']
> >
> > Do you have this same problem, or this something I might have done
> > wrong somewhere along the line.
> >
>
> Those appear to be from the previous fortran implementation.  Can you try:
>
> rm -rf scipy/build
> rm -rf scipy/Lib/sparse
> svn update
>
> and see if that remedies the problem?  I suspect you just have a stray
> _sparsetools.so from before.

That solved the problem, thanks! I now have 4 remaining test failures
of the form:

======================================================================
ERROR: Test for new slice functionality (EJS)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/scipy/sparse/tests/test_sparse.py",
line 283, in check_get_horiz_slice
    assert_array_equal(B[1,:], A[1,:].todense())
  File "/usr/lib/python2.4/site-packages/scipy/sparse/sparse.py", line
364, in todense
    return asmatrix(self.toarray())
  File "/usr/lib/python2.4/site-packages/scipy/sparse/sparse.py", line
1460, in toarray
    sparsetools.csrtodense(self.shape[0],self.shape[1],self.indptr,self.colind,self.data,data)
  File "/usr/lib/python2.4/site-packages/scipy/sparse/sparsetools.py",
line 380, in csrtodense
    return _sparsetools.csrtodense(*args)
NotImplementedError: No matching function for overloaded 'csrtodense'


Any ideas?

Cheers,

Tim

>
> --
> Nathan Bell wnbell at gmail.com
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>



More information about the SciPy-Dev mailing list