Generalized Reduced Gradient Method Python La