[Numpy-discussion] Numpy large array bug

Kashyap Ashwin Ashwin.Kashyap@thomson....
Mon Sep 21 12:45:27 CDT 2009


Hello,

I have downloaded numpy 1.3rc2 sources and compiled it on Ubuntu Hardy
Linux x86_64. numpy.test() seems to run ok as well.

 

Here is the bug I can reproduce

 

import numpy as np

a=np.zeros((2*1024*1024*1024 + 10000), dtype="uint8")

a[:]=1

 

# returns immediately

a.mean()

0.0

 

print a

[0 0 0 ..., 0 0 0]

 

The bug only happens when the nElements > 2G (2^31). So for
dtype=uint16/32, the bug happens when size is greater thatn 2^31 as
well. 

 

Can someone please tell me if I can find a patch for this? I checked the
mailing list and trac and I cannot find any related bug.

 

Thanks,

Ashwin

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090921/d7b52056/attachment.html 


More information about the NumPy-Discussion mailing list