title: Multithreaded calls to the objective function of scipy.optimize.leastsq
body: <p>I'm using <code>scipy.optimize.leastsq</code> in conjunction with a simulator. <code>leastsq</code> calls a user-defined objective function and passes an input vector to it. In turn, the objective function returns an error vector. <code>leastsq</code> optimizes the input vector in such a way that the sum of the squares of the error vector is minimized.</p>
  
  <p>In my case the objective function will run a whole simulation each time it is called. The employed simulator is single-threaded and needs several minutes for each run. I'd therefore like to run multiple instances of the simulator at once. However, calls to the objective function are performed serially. </p>
  
  <p>How can I get <code>leastsq</code> to perform multiple calls to the objective function at once?</p>