[SciPy-user] IBM float point format...
fred
fredmfp at gmail.com
Wed Jan 14 17:16:52 EST 2009
Robert Kern a écrit :
Hi Robert,
First, the python implementation.
python complains that operand >> is not supported on numpy.float32 and
int (which I understand quite well for float32):
2 """ Converts an IBM floating point number into IEEE format. """
3
----> 4 sign = ibm >> 31 & 0x01
5
6 exponent = ibm >> 24 & 0x7f
TypeError: unsupported operand type(s) for >>: 'numpy.float32' and 'int'
What am I doing wrong ?
Cheers,
--
Fred
More information about the SciPy-User
mailing list