[Numpy-discussion] 64-bit Fedora 9 a=numpy.zeros(0x80000000, dtype='b1')

Sebastian sebas0@gmail....
Mon Sep 14 09:43:46 CDT 2009


Thanks for the help.
I think that deleting the old build directory before rebuilding may have
been the trick.
The output below shows i'm no longer reproducing the error.
best wishes,
- Sebastian Gurovich

In [3]: numpy.__version__
Out[3]: '1.3.0'
In [4]: a=numpy.zeros(0x80000000,dtype='b1')
In [5]: a.data
Out[5]: <read-write buffer for 0x2935d50, size 2147483648, offset 0 at
0x2bd2f30

On Sun, Sep 13, 2009 at 11:11 AM, Charles R Harris <
charlesr.harris@gmail.com> wrote:

>
>
> 2009/9/13 Nadav Horesh <nadavh@visionsense.com>
>
>>
>> Could it be a problem of python version? I get no error with python2.6.2
>> (on amd64 gentoo)
>>
>>  Nadav
>>
>> -----הודעה מקורית-----
>> מאת: numpy-discussion-bounces@scipy.org בשם David Cournapeau
>> נשלח: א 13-ספטמבר-09 09:48
>> אל: Discussion of Numerical Python
>> נושא: Re: [Numpy-discussion] 64-bit Fedora 9 a=numpy.zeros(0x80000000,
>> dtype='b1')
>>
>> Charles R Harris wrote:
>> >
>> >
>> > On Sat, Sep 12, 2009 at 9:03 AM, Citi, Luca <lciti@essex.ac.uk
>> > <mailto:lciti@essex.ac.uk>> wrote:
>> >
>> >     I just realized that Sebastian posted its 'uname -a' and he has a
>> >     64bit machine.
>> >     In this case it should work as mine (the 64bit one) does.
>> >     Maybe during the compilation some flags prevented a full 64bit
>> >     code to be compiled?
>> >     __
>> >
>> >
>> > Ints are still 32 bits on 64 bit machines, but the real question is
>> > how python interprets the hex value.
>>
>>
>> That's not a python problem: the conversion of the object to a C
>> int/long happens in numpy (in PyArray_IntpFromSequence in this case). I
>> am not sure I understand exactly what the code is doing, though. I don't
>> understand the rationale for #ifdef/#endif in the one item in shape
>> tuple case (line 521 and below), as well as the call to PyNumber_Int,
>>
>>
> Possibly, I get
>
> In [1]: a=numpy.zeros(0x80000000,dtype='b1')
> ---------------------------------------------------------------------------
> ValueError                                Traceback (most recent call last)
>
> /home/charris/<ipython console> in <module>()
>
> ValueError: Maximum allowed dimension exceeded
>
> This on 32 bit fedora 11 with  python 2.6. Hmm, "maximum allowed size
> exceeded" might be a better message.
>
> Chuck
>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090914/760e7ca7/attachment.html 


More information about the NumPy-Discussion mailing list