import numpy import matplotlib.pyplot as plt %matplotlib inline
a = np.arange(10) b = a.reshape((5,2))
print a print b
[0 1 2 3 4 5 6 7 8 9] [[0 1] [2 3] [4 5] [6 7] [8 9]]
aa = np.arange(9) aa = aa.reshape((3,3))
plt.imshow(aa) plt.show()