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

Nathan Bell wnbell at gmail.com
Sat Jan 6 02:26:11 CST 2007

On 1/6/07, Tim Leslie <tim.leslie at gmail.com> wrote:
> 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?

I've made some changes to sparse.py in the last hour, so first update
to version 2499.  On my system, all unittests pass with 2499.

The error is caused when SWIG cannot find a version of the
(overloaded) function with the correct types.  This usually means that
one of the arguments is of the wrong type.  For example I recently
fixed some bugs caused by self.shape being a float tuple instead of an
int tuple.

Update to 2499 and let me know if the problem persists.  If so, see if
you can determine the types of the arguments.

Thanks for the quick feedback!

Nathan Bell wnbell at gmail.com

More information about the Scipy-dev mailing list