[Numpy-tickets] [NumPy] #463: hex(), oct() fails on int64 array
NumPy
numpy-tickets@scipy....
Tue Mar 6 10:48:43 CST 2007
#463: hex(), oct() fails on int64 array
----------------------------+-----------------------------------------------
Reporter: gregsmithto | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: numpy.numarray | Version:
Severity: normal | Keywords:
----------------------------+-----------------------------------------------
This probably only fails on 32-bit platforms:
{{{
>>> a = array([0,257<<31])
>>> a
array([ 0, 551903297536], dtype=int64)
>>> a[1]
551903297536
>>> hex(a[1])
'-0x80000000'
>>> hex(a.tolist()[1])
'0x8080000000L'
}}}
It looks like the value is being squeezed through an int32 pipe before the
conversion. oct() is likewise.
--
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/463>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.
More information about the Numpy-tickets
mailing list