From 4edf5bc861517a8879b051106fd102474cafa518 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Thu, 6 Dec 2018 15:58:45 +0000 Subject: Fix lazy range in python3 --- lib/kmean.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/kmean.py b/lib/kmean.py index f041b19..64ab166 100644 --- a/lib/kmean.py +++ b/lib/kmean.py @@ -21,7 +21,7 @@ def create_kmean_clusters(feature_vectors, labels, gallery_idx, camId): for i in range(2): km_train_data.append(KMeans(n_clusters=int(np.max(labels)),random_state=0).fit(train[i])) km_idx.append(km_train_data[i].labels_) - km_labels.append(range(np.max(labels))) + km_labels.append(list(range(np.max(labels)))) for j in range(np.max(labels)): class_vote = np.zeros(np.max(labels)) for q in range(km_idx[i].size): -- cgit v1.2.3-54-g00ecf