title: numpy and Global Interpreter Lock
body: <p>I am about to write some computationally-intensive Python code that'll almost certainly spend most of its time inside <code>numpy</code>'s linear algebra functions.</p>
  
  <p>The problem at hand is <a href="http://en.wikipedia.org/wiki/Embarrassingly_parallel">embarrassingly parallel</a>. Long story short, the easiest way for me to take advantage of that would be by using multiple threads. The main barrier is almost certainly going to be the Global Interpreter Lock (GIL).</p>
  
  <p>To help design this, it would be useful to have a mental model for which <code>numpy</code> operations can be expected to release the GIL for their duration. To this end, I'd appreciate any rules of thumb, dos and don'ts, pointers etc.</p>
  
  <p>In case it matters, I'm using 64-bit Python 2.7.1 on Linux, with <code>numpy</code> 1.5.1 and <code>scipy</code> 0.9.0rc2, built with Intel MKL 10.3.1.</p>