[Numpy-discussion] Numpy large array bug

Kashyap Ashwin Ashwin.Kashyap@thomson....
Mon Sep 21 13:55:56 CDT 2009


Yes, it happens for the trunk as well.


> > 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.




More information about the NumPy-Discussion mailing list