mnist_manipulation.py is not working at all for me
Closed this issue · 2 comments
litch commented
I'm running python 2.7 on OS X. Most of the code has been working (or I could make it work with a couple little tweaks here and there, but this section seems totally broken.
Existing is:
fig = plt.figure()
for n in range(10):
sfig = fig.add_subplot(5, 2, n)
ax.matshow(z1, cmap = matplotlib.cm.binary)
plt.xticks(np.array([]))
plt.yticks(np.array([]))
plt.show()
I think this is a bit closer... But it just makes plots that are single long lines.
for n in range(10):
sfig = fig.add_subplot(5, 2, n+1)
sfig.matshow(avg_pixels.ix[n:n,:], cmap = matplotlib.cm.binary)
plt.xticks(np.array([]))
plt.yticks(np.array([]))
plt.show()
DarrenCook commented
Thanks for the report! The fixes are here. The missing line took one row of a pandas data frame and turned it into a 28x28 matrix, ready to be plotted.
c70c4e1
(Looks like it was some bad copy-and-pasting from the Jupyter notebook I was working in, at the time.)
litch commented
Great, thanks!