Skip to content

Commit

Permalink
Bug fix: ocr example; python 3 (keras-team#6060)
Browse files Browse the repository at this point in the history
  • Loading branch information
farizrahman4u authored and fchollet committed Mar 30, 2017
1 parent b9fc562 commit b260333
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/image_ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit b260333

Please sign in to comment.