Skip to content

Commit

Permalink
correction of bug in read_blk.py
Browse files Browse the repository at this point in the history
  • Loading branch information
teogale committed Aug 30, 2019
1 parent 171b95a commit dc55f8e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions neo/rawio/read_blk.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@
import math



def read(name, type, nb, dictionary, file):

if type == 'int32':
#dictionary[name] = int.from_bytes(file.read(4), byteorder=sys.byteorder, signed=True)
dictionary[name] = struct.unpack("i", file.read(4))[0]
if type == 'float32':
l = struct.unpack('f', file.read(4))[0]
dictionary[name] = l[0]
dictionary[name] = struct.unpack('f', file.read(4))[0]
if type == 'uint8':
l = []
for i in range(nb):
l.append(struct.unpack('B', file.read(1))[0])
l.append(chr(struct.unpack('B', file.read(1))[0]))
dictionary[name] = l
if type == 'uint16':
l = []
Expand Down

0 comments on commit dc55f8e

Please sign in to comment.