Created
August 2, 2011 19:50
-
-
Save goretkin/1121046 to your computer and use it in GitHub Desktop.
fmin_cobyla is returning nan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Created on Tue Aug 2 15:43:21 2011 | |
@author: gustavo | |
""" | |
from scipy.optimize import fmin_cobyla | |
import numpy as np | |
def objective(x): | |
print x | |
return np.inf | |
def constraint1(x): | |
return 0 | |
xstar = fmin_cobyla(func=objective, x0=1,cons=[constraint1]) | |
print xstar |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment