[SciPy-user] sparse matrix dtype

Nathan Bell wnbell@gmail....
Mon Dec 17 23:16:08 CST 2007

Robin <robince <at> gmail.com> writes:

> On 10/9/07, Robin <robince <at> gmail.com> wrote:
> I am trying to make a large sparse matrix - the values are all integers (in
fact all non-zeros will be 1) so it would save me a lot of memory if I could use
> I added 'b' to the string of allowed dtypes in  getdtype() on line  2791 of 
> sparse.py.It now seems to behave as I would expect (hope), but it can't be
that simple can it?Is it likely that doing this will break something else? Why
are the dtypes restricted in the first place.ThanksRobin

FWIW integer dtypes are supported in the next release (and the current SVN)

The problem before was not on the python side.  It was the backend code
(sparse.sparsetools) that didn't support integer types.

More information about the SciPy-user mailing list