I would like to read a binary data file that contains a header part (text) and then a numeric array. I can use f.read(block_size) to keep streaming in the header part, but what is the best way to read the numeric array?
In MatLab, I could do
fid = fopen(data_file_name, 'rb');
line = fread(fid, block_size, '*char');
data = fread(fid, 'long');
In Python, what I have done is
f = open(data_file_name, 'rb')
header = f.read(block_size)
and from here I do not know how to get to the numeric array.