Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

Commit

Permalink
Changes to pylab code, seems to have changed API?
Browse files Browse the repository at this point in the history
  • Loading branch information
alexjc committed Jun 24, 2015
1 parent 1de7d2b commit 81470c0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/plot_digits.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@


# Show some training images and some test images too.
import pylab
import matplotlib.pyplot as pylab

for index, (image, label) in enumerate(zip(digits.images, digits.target)[:6]):
for index, (image, label) in enumerate(zip(digits.images[:6], digits.target[:6])):
pylab.subplot(2, 6, index + 1)
pylab.axis('off')
pylab.imshow(image, cmap=pylab.cm.gray_r, interpolation='nearest')
pylab.title('Training: %i' % label)

for index, (image, prediction) in enumerate(zip(X_test, y_pred)[:6]):
for index, (image, prediction) in enumerate(zip(X_test[:6], y_pred[:6])):
pylab.subplot(2, 6, index + 7)
pylab.axis('off')
pylab.imshow(image.reshape((8,8)), cmap=pylab.cm.gray_r, interpolation='nearest')
Expand Down

0 comments on commit 81470c0

Please sign in to comment.