[Numpy-discussion] dimensions too large error

Dinesh B Vadhia dineshbvadhia at hotmail.com
Fri Mar 14 21:00:58 EDT 2008


For the following code:

I = 18000
J = 33000
filename = 'ij.txt'
A = scipy.asmatrix(numpy.empty((I,J), dtype=numpy.int))
    for line in open(filename, 'r'):
        etc.

The following message appears:

Traceback (most recent call last):
    File "C:\...\....py", line 362, in <module>
    A= scipy.asmatrix(numpy.empty((I,J), dtype=numpy.int))
    ValueError: dimensions too large.

Is there a limit to array/matrix dimension sizes?  

Btw, for numpy array's, ascontiguousarray() is available to set aside contiguous memory.  Is there an equivalent for scipy matrix ie. an ascontiguousmatrix()?

Dinesh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080314/0a0a548b/attachment.html>


More information about the NumPy-Discussion mailing list