title: Efficient numpy subarrays extraction from a mask
body: <p>I am searching a pythonic way to extract multiple subarrays from a given array using a mask as shown in the example:</p>
  
  <pre><code>a = np.array([10, 5, 3, 2, 1])
  m = np.array([True, True, False, True, True])
  </code></pre>
  
  <p>The output will be a collection of array  like the following, where only the contiguous "region" of True values (True values next to each other) of the mask <code>m</code> represent the indices generating a subarray.</p>
  
  <pre><code>L[0] = np.array([10, 5])
  L[1] = np.array([2, 1])
  </code></pre>