paulknysh / blackbox

A Python module for parallel optimization of expensive black-box functions
MIT License
439 stars 60 forks source link

Cannot pass function arguments. #26

Open SSimonTemplar opened 3 years ago

SSimonTemplar commented 3 years ago

Hello Paul.

Is it possible to pass function arguments to the solver? For example, my function is defined as:

def func(x,*parms):

And then with the scipy minimize I can pass the parameters with the args= argument:

minimize(func, Initial_Guesses, method = 'SLSQP', bounds = Bounds, args=Parms )

I looked at the code but did not see a way to pass this argument. Thanks

paulknysh commented 3 years ago

Hi, sorry, I don't have a good answer here actually, never ran into such scenario. Under the hood, scipy minimizes RBF fit, not the function itself, not sure if it's possible to do that..