I have a simple binary file that contains 32-bit floats adjacent to each other.
Using Julia, I would like to read each number (i.e. each 32-bit word) and put them each sequentially into a array of Float32
format.
I've tried a few different things through looking at the documentation, but all have yielded impossible values (I am using a binary file with known values as dummy input). It appears that:
Julia is reading the binary file one-byte at a time.
Julia is putting each byte into a
Uint8
array.
For example, readbytes(f, 4)
gives a 4-element array of unsigned 8-bit integers. read(f, Float32, DIM)
also gives strange values.
Anyone have any idea how I should proceed?