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

Tim Leslie tim.leslie at gmail.com
Sat Jan 6 04:39:06 EST 2007


On 1/6/07, Tim Leslie <tim.leslie at gmail.com> wrote:
> On 1/6/07, Nathan Bell <wnbell at gmail.com> wrote:
> > 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!
>
> Those errors are with 2499. I'll do some more debugging and see if I
> can find what's going on.

OK, it looks like it's a 64 bit problem. The tests pass on my 32 bit
machine, it's only the 64 bit one that's a problem. It seems that some
parameters are of dtype int64 when they need to be int32. I'll keep
debugging this and keep you informed.

Tim

>
> 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