Python Numpy Gradient Descent Equation