[Numpy-discussion] Just what is an "Int32" ?

Chris Barker chrishbarker at home.net
Thu May 3 17:47:02 EDT 2001


Hi all,

I'm writing an extension that uses a NumPy array (among other things).
To make sure that I have passed in what I'm looking for, I do a:

if (Array->descr->type_num != PyArray_LONG) ...
	PyErr_SetString (PyExc_ValueError,"Array is the wrong type");
	return NULL;
  }
(I want Array to be an array of longs)

When I call my extension with an array built using array([...],Int32),
this error results (this is on both Windows and Linux on Intel
hardware). If I build the array with "Int" it works fine. This isn't
really a problem, but I am curious, what is an Int32 on Intel hardware?,
and why wouldn't it be a long?

-Chris





-- 
Christopher Barker,
Ph.D.                                                           
ChrisHBarker at home.net                 ---           ---           ---
http://members.home.net/barkerlohmann ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------




More information about the NumPy-Discussion mailing list