[SciPy-Dev] 64-bit sparse matrix indices

Nathaniel Smith njs at pobox.com
Sat Jan 25 15:58:00 EST 2014


On Sat, Jan 25, 2014 at 8:34 PM, Pauli Virtanen <pav at iki.fi> wrote:
> Hi,
>
> The 32 & 64 support for sparse matrices is nearly finished, and
> essentially waiting for more testing & merging:
>
>         https://github.com/scipy/scipy/pull/442
>
> What this will do is that sparse matrices with nnz that fit into 32 bit
> use 32-bit index arrays, but those with larger nnz automatically switch
> into 64-bit indices.
>
> This means that e.g. csr_matrix.indices can be either int32 or int64. In
> most cases (for sparse matrices taking less than a few gigabytes of
> memory) it will be int32.

Does this also allow for sparse matrices with more than 2**32 rows or
columns (which might have arbitrarily small nnz)?

-- 
Nathaniel J. Smith
Postdoctoral researcher - Informatics - University of Edinburgh
http://vorpus.org



More information about the SciPy-Dev mailing list