gradient calculation with python,np.cos(-1.5)