Bug fix: ocr example; python 3 (#6060)
This commit is contained in:
parent
b9fc5625fe
commit
b260333eed
@ -127,9 +127,9 @@ def shuffle_mats_or_lists(matrix_list, stop_ind=None):
|
||||
stop_ind = len_val
|
||||
assert stop_ind <= len_val
|
||||
|
||||
a = range(stop_ind)
|
||||
a = list(range(stop_ind))
|
||||
np.random.shuffle(a)
|
||||
a += range(stop_ind, len_val)
|
||||
a += list(range(stop_ind, len_val))
|
||||
for mat in matrix_list:
|
||||
if isinstance(mat, np.ndarray):
|
||||
ret.append(mat[a])
|
||||
|
Loading…
Reference in New Issue
Block a user