[SciPy-dev] bug: indexing CSR matrix, 64bits

Nathan Bell wnbell@gmail....
Mon May 12 15:25:04 CDT 2008


On Mon, May 12, 2008 at 4:34 AM, Robert Cimrman <cimrman3@ntc.zcu.cz> wrote:
>
>  I tracked it in my code. Due to construction, the items of ir, ic slices
>  (ir.start, ir.stop, ...) had 'numpy.int32' type. After retyping to 'int'
>  everything works.

Thanks for isolating the problem.  Please try r4294:
http://projects.scipy.org/scipy/scipy/changeset/4294

>  Nathan, do you think that ensuring correct slice data deserves a
>  ticket/fix? I cannot implement it now, but it would be IMHO fairly easy
>  to do.

If I had more time I'd test sparse indexing more exhaustively.  The
bug you found is probably not the only example of an integer-like
object slipping through to sparsetools.

The better approach may be to make SWIG convert integer-like
singletons to C integers.

-- 
Nathan Bell wnbell@gmail.com
http://graphics.cs.uiuc.edu/~wnbell/


More information about the Scipy-dev mailing list