<br><br><div class="gmail_quote">On Sat, Apr 23, 2011 at 3:38 PM, Christoph Gohlke <span dir="ltr"><<a href="mailto:cgohlke@uci.edu">cgohlke@uci.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im"><br>
<br>
On 4/23/2011 10:41 AM, Charles R Harris wrote:<br>
><br>
><br>
> On Sat, Apr 23, 2011 at 11:09 AM, Bruce Southey <<a href="mailto:bsouthey@gmail.com">bsouthey@gmail.com</a><br>
</div><div class="im">> <mailto:<a href="mailto:bsouthey@gmail.com">bsouthey@gmail.com</a>>> wrote:<br>
><br>
>     On Sat, Apr 23, 2011 at 9:58 AM, Till Stensitzki <<a href="mailto:mail.till@gmx.de">mail.till@gmx.de</a><br>
</div><div class="im">>     <mailto:<a href="mailto:mail.till@gmx.de">mail.till@gmx.de</a>>> wrote:<br>
>     ><br>
>     > > Do you also have an earlier version of numpy installed? As David<br>
>     says, this<br>
>     > >should raise an error for recent numpy and<br>
>     > >I'm wondering if you are inadvertently<br>
>     > >running an earlier version.Chuck<br>
>     ><br>
>     ><br>
>     >  I only have one python installation and<br>
>     >  numpy.__version__ shows 1.6b.<br>
>     >  I could reinstall numpy, if it would help.<br>
>     ><br>
>     >  _______________________________________________<br>
>     >  NumPy-Discussion mailing list<br>
</div>>     >  <a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a> <mailto:<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a>><br>
<div><div></div><div class="h5">>     >  <a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
>     ><br>
><br>
>     Hi,<br>
>     I can get this with 64-bit Win 7, 32-bit Python 2.6, 2.7 (below) and<br>
>     3.1 and numpy 1.6b (fresh install)  IDLE and the command line. I can<br>
>     also confirm the 'ValueError' with Python2.6 and numpy 1.51 on the<br>
>     same system.<br>
><br>
>     Actually this is 'weird' when printing and crashed with the range -<br>
>     accessing unassigned memory?<br>
>     A smaller array gives an numpy error or memory error in idle.<br>
><br>
>     Bruce<br>
><br>
><br>
>     > >> import numpy as np<br>
>     > >> x=np.zeros((262144, 262144))<br>
>     > >> x<br>
>     array([], shape=(262144, 262144), dtype=float64)<br>
>     > >> x[0,0]<br>
>     2.1453735050108555e-314<br>
>     > >> x[1:10,1:10]<br>
><br>
>     > >> ================================ RESTART<br>
>     ================================<br>
>     > >> import numpy as np<br>
><br>
>     > >> x=np.zeros((26214, 26214))<br>
><br>
>     Traceback (most recent call last):<br>
>       File "<pyshell#7>", line 1, in <module><br>
>         x=np.zeros((26214, 26214))<br>
>     ValueError: array is too big.<br>
>     > >><br>
>     > >> x=np.zeros((262144, 26214))<br>
><br>
>     Traceback (most recent call last):<br>
>       File "<pyshell#8>", line 1, in <module><br>
>         x=np.zeros((262144, 26214))<br>
>     MemoryError<br>
>     _____<br>
><br>
><br>
> This was fixed before, maybe it got broken again. Since this looks<br>
> windows specific, I'm guessing it has something to do with the size of<br>
> long being 32 bits.<br>
><br>
> The previous problem was integer overflow when multiplying the<br>
> dimensions together to get the array size when repeated divisions of the<br>
> maximum size should have be used instead.<br>
><br>
> Chuck<br>
<br>
</div></div>Could be related to this change:<br>
<br>
<<a href="https://github.com/numpy/numpy/commit/fcc6cc73ddcb1fc85446ba9256ac24ecdda6c6d8#L1L1121" target="_blank">https://github.com/numpy/numpy/commit/fcc6cc73ddcb1fc85446ba9256ac24ecdda6c6d8#L1L1121</a>><br>
<font color="#888888"><br></font></blockquote><div><br>My, that does look suspicious ;) Could you revert that loop and test it out?<br><br>There was also a function for doing that check, I don't recall which, and it should probably be checked to make sure it remains as was.<br>
<br>Chuck<br></div><br></div>