temps = np.array([30, 32, 29, 35, 36, 33, 31]) grad = np.gradient(temps) np.round(grad, 2)