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

Matthew Brett matthew.brett at gmail.com
Sun Mar 22 04:40:15 EDT 2009


Hi,

On Sun, Mar 22, 2009 at 1:31 AM, David Cournapeau <cournape at gmail.com> wrote:
> Hi Matthew,
>
> On Sun, Mar 22, 2009 at 3:08 PM, Matthew Brett <matthew.brett at 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
      2
      3
      4
      5

ValueError: negative dimensions are not allowed

I guess that should go on the ticket too,

Thanks a lot,

Matthew



More information about the NumPy-Discussion mailing list