[Numpy-discussion] Numpy large array bug

Charles R Harris charlesr.harris@gmail....
Mon Sep 21 13:40:08 CDT 2009


On Mon, Sep 21, 2009 at 12:30 PM, Francesc Alted <faltet@pytables.org>wrote:

> A Monday 21 September 2009 19:45:27 Kashyap Ashwin escrigué:
> > 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.
>
> Yup.  I can reproduce your problem with NumPy 1.3.0 (final) and a 64-bit
> platform.  I suppose that you should file a bug better.
>
>
Does is persist for svn? IIRC, there is another ticket for a slicing bug for
large arrays.

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


More information about the NumPy-Discussion mailing list