[Numpy-discussion] Segmentation fault on large arrays
Nicolas Rougier
Nicolas.Rougier at loria.fr
Tue May 26 03:55:58 EDT 2009
Hello,
I've come across what is probably a bug in size check for large arrays:
>>> import numpy
>>> z1 = numpy.zeros((255*256,256*256))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: dimensions too large.
>>> z2 = numpy.zeros((256*256,256*256))
>>> z2.shape
(65536, 65536)
>>> z2[0] = 0
Segmentation fault
Note that z1 size is smaller than z2 but z2 is not told that its
dimensions are too large. This has been tested with numpy 1.3.0.
Nicolas
More information about the NumPy-Discussion
mailing list