I have a problem I can't figure out. I have created a interpolated function from data using scipy.interpolate.interp2d this gives me a callable function of two variables
def Time_function():
'''creates a interpolated function of Time depending on
Cl and Cd using the in and outputs of matlab sim run.
'''
return interp2d(import_data()[0], import_data()[1], import_data()[2])
Witch works well, however I now want to find the minimum of this function using scipy.optimize.fmin or mimimize
def find_min_time():
'''finds the min time based on the interpolated function
'''
f = Time_function()
return minimize(f, np.array([1.0, 0.4]))
f obviously takes 2 arguments so minimize will need a function (f) and two guesses. However I can't seem to find the correct way to input the initail guesses as I get this error:
TypeError: __call__() takes at least 3 arguments (2 given)
Anyone know of a solution?
Cheers//