[SciPy-User] reading binaries with numpy
Gabriele Brambilla
gb.gabrielebrambilla at gmail.com
Thu May 19 12:17:09 EDT 2016
Hi,
I'm trying to read a binary file with fromfile:
import numpy as np
dataline = 1897469
f = open(fname, 'rb')
for iw in range(dataline):
data = np.fromfile(f , dtype = np.float64 , count = 17)
alas = data[0]
However, I would like to write a cycle that stops at the eof.
I know that the file has been written with sequences of 17 float.
Thanks
GB
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20160519/3d3af9f7/attachment.html>
More information about the SciPy-User
mailing list