[Numpy-discussion] why is int32 a NPY_LONG on 32bitLinux & NPY_INT on 64bitLinux
Sebastian Haase
haase at msg.ucsf.edu
Tue Aug 22 14:11:03 CDT 2006
Hi,
I just ran into more problems with my SWIG
typemaps.
In the C api the current enum for
NPY_INT is 5
NPY_LONG is 7
to match overloaded function I need to check these type values.
On 64bit all works fine:
my 32bit int function matches NPY_INT - which is "int" in C/C++
my 64bit int function matches NPY_LONG - which is "long" in C/C++
but on 32bit Linux
the 32bit int function matches NPY_LONG
there is no NPY_INT on 32bit
that is: if I have a non overloaded C/C++ function that expects a C "int"
- i.e. a 32bit int - I have write different function matching rules !!!
REQUEST:
Can a 32bit int array get the typenumber code NPY_INT
on 32bit Linux !?
Then it would work for both 32bit Linux and 64bit Linux the same !
(I don't know about 64bit windows - I have heard that both C int and C long
are 64bit - so that is screwed in any case .... )
Thanks,
Sebastian Haase
More information about the Numpy-discussion
mailing list