From b260333eed8552a997d0207dcef0a1538e5ae91e Mon Sep 17 00:00:00 2001 From: Fariz Rahman Date: Thu, 30 Mar 2017 16:54:12 +0530 Subject: [PATCH] Bug fix: ocr example; python 3 (#6060) --- examples/image_ocr.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/image_ocr.py b/examples/image_ocr.py index c6eb53394..15d201128 100644 --- a/examples/image_ocr.py +++ b/examples/image_ocr.py @@ -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])