title: Binary numpy array to list of integers?
body: <p>I have a binary array, and I would like to convert it into a list of integers, where each int is a row of the array.</p>
  
  <p>For example:</p>
  
  <pre><code>from numpy import *
  a = array([[1, 1, 0, 0], [0, 1, 0, 0], [0, 1, 1, 1], [1, 1, 1, 1]])
  </code></pre>
  
  <p>I would like to convert <code>a</code> to <code>[12, 4, 7, 15]</code>.</p>