[Numpy-tickets] [NumPy] #370: oldnumeric.Int32 mapping on 32-bit platforms seems wrong
NumPy
numpy-tickets at scipy.net
Thu Nov 2 04:48:12 CST 2006
#370: oldnumeric.Int32 mapping on 32-bit platforms seems wrong
-----------------------+----------------------------------------------------
Reporter: faltet | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: numpy.lib | Version: devel
Severity: normal | Keywords:
-----------------------+----------------------------------------------------
Hi,
I think that, for 32-bit platforms, oldnumeric.Int32 should be mapped to a
C long, instead as a C int as it is now. This is to be consistent with:
{{{
In [16]: numpy.zeros((1,), numpy.int32).dtype.num
Out[16]: 7
In [17]: numpy.zeros((1,), numpy.sctypeNA['Int32']).dtype.num
Out[17]: 7
In [18]: numpy.zeros((1,), oldnumeric.int32).dtype.num
Out[18]: 7
# Fine until here, but:
In [19]: numpy.zeros((1,), oldnumeric.Int32).dtype.num
Out[19]: 5 # !!
}}}
This can effectively be a source of problems with packages that use
oldnumeric. scipy.ndimage is one of them that gets affected by this. See:
http://aspn.activestate.com/ASPN/Mail/Message/scipy-user/3321095
Regards,
--
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/370>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list