title: How to limit the CPU-cores used by scipy.integrate.quad
body: <p>I've got a program that uses scipy.integrate.quad(). When I use it I noticed that it uses all the cores on my PC, which I don't want as I want to run this script in parallel on multiple cores. Is there any way to restrict the function?</p>
  <p>I have already tried limiting it with this command before import scipy and numpy:</p>
  <pre class="lang-py prettyprint-override"><code>import os
  import sys
  
  os.environ.update(
      OMP_NUM_THREADS='1',
      OPENBLAS_NUM_THREADS='1',
      NUMEXPR_NUM_THREADS='1',
      MKL_NUM_THREADS='1',
  )
  </code></pre>
  <p>Unfortunately that didn't help either. Are there other things I could try? My scipy uses openblas in case that is relevant too.</p>