@@ -360,7 +360,7 @@ def read_mlist(fileobj, endianness):
360
360
* n_rows - number of mlist rows in this block (between ?0 and 31) (called
361
361
`nused` in CTI code).
362
362
"""
363
- dt = np .dtype (np .int32 ) # should this be uint32 given mlist dtype?
363
+ dt = np .dtype (np .int32 )
364
364
if not endianness is native_code :
365
365
dt = dt .newbyteorder (endianness )
366
366
mlists = []
@@ -369,7 +369,7 @@ def read_mlist(fileobj, endianness):
369
369
while True :
370
370
# Read block containing mlist entries
371
371
fileobj .seek ((mlist_block_no - 1 ) * BLOCK_SIZE ) # fix 1-based indexing
372
- dat = fileobj .read (128 * 32 ) # isn't this too long? Should be 512?
372
+ dat = fileobj .read (BLOCK_SIZE )
373
373
rows = np .ndarray (shape = (32 , 4 ), dtype = dt , buffer = dat )
374
374
# First row special, points to next mlist entries if present
375
375
n_unused , mlist_block_no , _ , n_rows = rows [0 ]
@@ -381,8 +381,6 @@ def read_mlist(fileobj, endianness):
381
381
mlist_index += n_rows
382
382
if mlist_block_no <= 2 : # should block_no in (1, 2) be an error?
383
383
break
384
- # Code in ``get_frame_order`` seems to imply ids can be < 0; is that
385
- # true? Should the dtype be uint32 or int32?
386
384
return np .row_stack (mlists )
387
385
388
386
0 commit comments