Skip to content

Commit 80e9738

Browse files
authored
fixed a typo xrange() -> range() (#215)
xrange() is deprecated in Python 3.x. consider using range() instead.
1 parent 59e6cef commit 80e9738

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

classification.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class NearestNeighbor(object):
126126
Ypred = np.zeros(num_test, dtype = self.ytr.dtype)
127127

128128
# loop over all test rows
129-
for i in xrange(num_test):
129+
for i in range(num_test):
130130
# find the nearest training image to the i'th test image
131131
# using the L1 distance (sum of absolute value differences)
132132
distances = np.sum(np.abs(self.Xtr - X[i,:]), axis = 1)

0 commit comments

Comments
 (0)