[Numpy-discussion] Re: Trying out Numeric3

Michiel Jan Laurens de Hoon mdehoon at ims.u-tokyo.ac.jp
Tue Mar 22 05:47:19 CST 2005


Travis Oliphant wrote:
> Michiel Jan Laurens de Hoon wrote:
>> Another warning was that PyArrayObject's "dimensions" doesn't seem to 
>> be an int array any more.
> 
> Yes.   To allow for dimensions that are bigger than 32-bits, dimensions 
> and strides are (intp *).  intp is a signed integer with sizeof(intp) == 
> sizeof(void *).  On 32-bit systems, the warning will not cause 
> problems.  We could worry about fixing it by typedefing intp to int 
> (instead of the current long for 32-bit systems).
> 
Do 4 gigabyte 1D numerical python arrays occur in practice? If I understand 
correctly, the current implementation gives dimensions a different pointer type 
on different platforms. This will break extension modules on platforms other 
than 32-bits, as the extension module expects dimensions to be a pointer to int.

--Michiel.

-- 
Michiel de Hoon, Assistant Professor
University of Tokyo, Institute of Medical Science
Human Genome Center
4-6-1 Shirokane-dai, Minato-ku
Tokyo 108-8639
Japan
http://bonsai.ims.u-tokyo.ac.jp/~mdehoon




More information about the Numpy-discussion mailing list