%matplotlib inline import matplotlib.pyplot as plt import numpy as np a = np.array([1, 2, 3, 42]) a b = np.linspace(0, 10, 50) b np.sin(b) _ = plt.plot(b, np.sin(b)) plt.plot(b, np.sin(b), label='f(x) = sin(x)') plt.plot(b, np.cos(2 * b), label='f(x) = cos(2x)') _ = plt.legend(loc='lower right') x = np.random.normal(loc=0, scale=1.0, size=1000) x.shape x.dtype x[:10] np.mean(x), np.std(x) np.min(x), np.max(x) _ = plt.plot(x) _ = plt.hist(x, bins=20) _ = plt.plot(np.cumsum(x))