Skip to content Skip to sidebar Skip to footer

Reading Binary Big Endian Files In Python

I'd like to use python read a large binary file in ieee big endian 64bit floating point format, but am having trouble getting the correct values. I have a working method in matlab

Solution 1:

Using >f will give you a single-precision (32-bit) floating point value. Instead, try

data = np.fromfile(filename, dtype='>f8', count=-1)

Post a Comment for "Reading Binary Big Endian Files In Python"