Implementing Gradient Descent In Python