[SciPy-user] IBM float point format...

David Cournapeau david@ar.media.kyoto-u.ac...
Wed Jan 14 16:32:49 CST 2009

fred wrote:
> Zachary Pincus a écrit :
>> I presume you are to read in the data from disk as an int32, which  
>> then gets processed to a float by Robert's code.
> Sorry, I'm afraid I don't understand you here.
> Do you mean that I have to read my data as int32 from my file which
> contains float32 ?

Yes. You can't read them in floating point support, since your machine
representation and IBM's representation are fundamentally different. You
want to import a type which is not supported by your CPU, so you have to
bypass completely the type system. Reading them as int32 means you
consider your bytes as a raw set of bits, which is what Robert's code is


More information about the SciPy-user mailing list