From 7b05d52f7b4f8b8eb80e5789c46c49203314727e Mon Sep 17 00:00:00 2001 From: berak Date: Thu, 11 May 2017 08:34:21 +0200 Subject: [PATCH] py_samples: fix digits.py --- samples/python/digits.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/python/digits.py b/samples/python/digits.py index 5cc98b713c..16d76a13b0 100755 --- a/samples/python/digits.py +++ b/samples/python/digits.py @@ -109,7 +109,7 @@ def evaluate_model(model, digits, samples, labels): confusion = np.zeros((10, 10), np.int32) for i, j in zip(labels, resp): - confusion[i, j] += 1 + confusion[i, int(j)] += 1 print('confusion matrix:') print(confusion) print()