Skip to content

Commit ce2c044

Browse files
authored
Small update for Python 3
Changed two print statements to print functions to be compatible with Python 3 instead of Python 2.
1 parent a8da42f commit ce2c044

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mnist_svm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def svm_baseline():
2020
# test
2121
predictions = [int(a) for a in clf.predict(test_data[0])]
2222
num_correct = sum(int(a == y) for a, y in zip(predictions, test_data[1]))
23-
print "Baseline classifier using an SVM."
24-
print "%s of %s values correct." % (num_correct, len(test_data[1]))
23+
print("Baseline classifier using an SVM.")
24+
print(num_correct + " of " + len(test_data[1]) + " values correct.")
2525

2626
if __name__ == "__main__":
2727
svm_baseline()

0 commit comments

Comments
 (0)