It looks like you are falling within the limits of 32-bit integers. Here is a quick test:
In [14]: np.array([10**9, 10**10], dtype=np.int64) Out[14]: array([ 1000000000, 10000000000]) In [15]: np.array([10**9, 10**10], dtype=np.int32) Out[15]: array([1000000000, 1410065408], dtype=int32)
Currently, most sparse matrix representations assume 32-bit integer indices, so they simply cannot support large arrays.
EDIT . Starting with version 0.14, scipy now supports 64-bit indexing. If you can upgrade, this problem will go away.
perimosocordiae
source share