Reputation: 1
When I try to read from a binary file using numpy.fromfile
, I get an error message saying io.UnsupportedOperation: seek
I am using Python 3.7.1
with open(filename, 'rb') as fin:
prolog = np.fromfile(fin, dtype=np.int32, count=15)
Upvotes: 0
Views: 704
Reputation: 249462
This is simpler and should definitely work:
prolog = np.fromfile(filename, dtype=np.int32, count=15)
Upvotes: 1