---------------------------------------------------------------------------
KeyboardInterrupt Traceback (most recent call last)
<ipython-input-678-4bffe313aef9> in <module>()
1 for i in range(1000):
----> 2 magic_display(X[i])
3 predicted_imgae = predict(Theta1, Theta2, X[i])
4 print("This is " + str(predicted_imgae));
<ipython-input-674-ebd0b41fba57> in magic_display(matrix)
60
61 # Get rod of grid
---> 62 plt.grid(False)
63 plt.imshow(display_array)
64
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\pyplot.py in grid(b, which, axis, **kwargs)
3788 @docstring.copy_dedent(Axes.grid)
3789 def grid(b=None, which='major', axis='both', **kwargs):
-> 3790 ret = gca().grid(b=b, which=which, axis=axis, **kwargs)
3791 return ret
3792
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\pyplot.py in gca(**kwargs)
948 matplotlib.figure.Figure.gca : The figure's gca method.
949 """
--> 950 return gcf().gca(**kwargs)
951
952 # More ways of creating axes:
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\figure.py in gca(self, **kwargs)
1367
1368 # no axes found, so create one which spans the figure
-> 1369 return self.add_subplot(1, 1, 1, **kwargs)
1370
1371 def sca(self, a):
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\figure.py in add_subplot(self, *args, **kwargs)
1019 self._axstack.remove(ax)
1020
-> 1021 a = subplot_class_factory(projection_class)(self, *args, **kwargs)
1022
1023 self._axstack.add(key, a)
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\axes\_subplots.py in __init__(self, fig, *args, **kwargs)
71
72 # _axes_class is set in the subplot_class_factory
---> 73 self._axes_class.__init__(self, fig, self.figbox, **kwargs)
74
75 def __reduce__(self):
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\axes\_base.py in __init__(self, fig, rect, facecolor, frameon, sharex, sharey, label, xscale, yscale, axisbg, **kwargs)
549
550 self._connected = {} # a dict from events to (id, func)
--> 551 self.cla()
552 # funcs used to format x and y - fall back on major formatters
553 self.fmt_xdata = None
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\axes\_base.py in cla(self)
1113 self.set_axis_on()
1114
-> 1115 self.xaxis.set_clip_path(self.patch)
1116 self.yaxis.set_clip_path(self.patch)
1117
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\axis.py in set_clip_path(self, clippath, transform)
869 artist.Artist.set_clip_path(self, clippath, transform)
870 for child in self.majorTicks + self.minorTicks:
--> 871 child.set_clip_path(clippath, transform)
872 self.stale = True
873
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\axis.py in set_clip_path(self, clippath, transform)
190
191 def set_clip_path(self, clippath, transform=None):
--> 192 artist.Artist.set_clip_path(self, clippath, transform)
193 self.gridline.set_clip_path(clippath, transform)
194 self.stale = True
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\artist.py in set_clip_path(self, path, transform)
692 if isinstance(path, Rectangle):
693 self.clipbox = TransformedBbox(Bbox.unit(),
--> 694 path.get_transform())
695 self._clippath = None
696 success = True
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\patches.py in get_transform(self)
219 to the :class:`Patch`.
220 """
--> 221 return self.get_patch_transform() + artist.Artist.get_transform(self)
222
223 def get_data_transform(self):
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\patches.py in get_patch_transform(self)
719
720 def get_patch_transform(self):
--> 721 self._update_patch_transform()
722 return self._rect_transform
723
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\patches.py in _update_patch_transform(self)
714 bbox = transforms.Bbox.from_bounds(x, y, width, height)
715 rot_trans = transforms.Affine2D()
--> 716 rot_trans.rotate_deg_around(x, y, self._angle)
717 self._rect_transform = transforms.BboxTransformTo(bbox)
718 self._rect_transform += rot_trans
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\transforms.py in rotate_deg_around(self, x, y, degrees)
1953 and :meth:`scale`.
1954 """
-> 1955 return self.translate(-x, -y).rotate_deg(degrees).translate(x, y)
1956
1957 def translate(self, tx, ty):
C:\Users\Danietzio\AppData\Local\Continuum\Anaconda3\lib\site-packages\matplotlib\transforms.py in translate(self, tx, ty)
1966 [[1.0, 0.0, tx], [0.0, 1.0, ty], [0.0, 0.0, 1.0]],
1967 np.float_)
-> 1968 self._mtx = np.dot(translate_mtx, self._mtx)
1969 self.invalidate()
1970 return self
KeyboardInterrupt: