pip3 install jupyter
ipython or jupyter notebook
“`
import numpy as np
from matplotlib.pyplot import imshow, title
import matplotlib.pylot as plt
from scipy.misc import imread, imsave, imresize
xs = np.arange(-np.pi, np.pi, 0.01)
xs = np.linspace(-np.pi, np.pi, 100)
xs, ys = np.meshgrid(xs, xs)
xs = np.arange(12).reshape(3, 4)
mat = np.random.random((2, 3))
z = np.sqrt(xs ** 2 + ys ** 2)
plt.imshow(z); plt.colorbar()
plt.title(“pic”)
plt.show()
“`
refs:
– http://cs231n.github.io/python-numpy-tutorial/