[Numpy-discussion] Unhelpful errors trying to create very large arrays?

Matthew Brett matthew.brett@gmail....
Sun Mar 22 03:40:15 CDT 2009


On Sun, Mar 22, 2009 at 1:31 AM, David Cournapeau <cournape@gmail.com> wrote:
> Hi Matthew,
> On Sun, Mar 22, 2009 at 3:08 PM, Matthew Brett <matthew.brett@gmail.com> wrote:
>> I notice this gives much more helpful memory errors on a 64 bit
>> machine with 4GB of memory.
> Can you tell me which version of numpy and which platform you are
> using ? I get a different (and ever more confusing) error message when
> the size overflows an int - I get "negative dimension not allowed".

Ah yes, I forgot: '1.3.0.dev6357'; ubuntu 8.04 32 bit.

I get the 'negative dimensions' error in this situation:
In [79]: n = 2500000000

In [80]: np.zeros(n)
ValueError                                Traceback (most recent call last)

/home/mb312/tmp/max_speed.py in <module>()
----> 1

ValueError: negative dimensions are not allowed

I guess that should go on the ticket too,

Thanks a lot,


More information about the Numpy-discussion mailing list