Conjugate Gradient Method Python Code