title: How to pass arguments to callback function in scipy.optimize.differential_evolution
body: <p>I am using differential_evolution from scipy.optimize for my optimization problem. My optimizer takes some arguments for the optimization.</p>
  
  <p>Code - </p>
  
  <pre><code>res = optimize.differential_evolution(objective,bounds,args=arguments,disp=True,callback = callback_DE(arguments))
  </code></pre>
  
  <p>I also have a callback function. I want to send my arguments to my callback function and that is where my issue arises.</p>
  
  <p>If I don't pass any arguments to my callback function, it works fine - </p>
  
  <pre><code>def callback_DE(x,convergence):        
     '''
     some code
     '''
  </code></pre>
  
  <p>However, if I give <code>arguments</code> as a parameter in the function definition like -</p>
  
  <pre><code>def callback_DE(x,convergence,arguments):        
     '''
     some code
     '''
  </code></pre>
  
  <p>It throws an error. </p>
  
  <p>What is the correct way to pass arguments to the callback function?</p>