Skip to content

Commit

Permalink
Small update for Python 3
Browse files Browse the repository at this point in the history
Changed two print statements to print functions to be compatible with Python 3 instead of Python 2.
  • Loading branch information
dgcampbe authored Mar 2, 2018
1 parent a8da42f commit ce2c044
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mnist_svm.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def svm_baseline():
# test
predictions = [int(a) for a in clf.predict(test_data[0])]
num_correct = sum(int(a == y) for a, y in zip(predictions, test_data[1]))
print "Baseline classifier using an SVM."
print "%s of %s values correct." % (num_correct, len(test_data[1]))
print("Baseline classifier using an SVM.")
print(num_correct + " of " + len(test_data[1]) + " values correct.")

if __name__ == "__main__":
svm_baseline()
Expand Down

0 comments on commit ce2c044

Please sign in to comment.