Gradient Descent Library Python