Просмотр исходного кода

Added test file that plots all A's/

Taddeus Kroes 14 лет назад
Родитель
Сommit
c333da8599
1 измененных файлов с 14 добавлено и 0 удалено
  1. 14 0
      src/test_chars_a.py

+ 14 - 0
src/test_chars_a.py

@@ -0,0 +1,14 @@
+#!/usr/bin/python
+from pylab import subplot, show, imshow, axis
+from cPickle import load
+
+chars = filter(lambda c: c.value == 'A', load(file('chars', 'r')))
+
+for i in range(10):
+    for j in range(3):
+        index = j * 10 + i
+        subplot(10, 3, index + 1)
+        axis('off')
+        imshow(chars[index].image.data, cmap='gray')
+
+show()