Batch Gradient Descent Algorithm Python