title: How to get an integer array from numpy.bincount when the weights parameter are integers
body: <p>Consider the numpy array <code>a</code></p>
  
  <pre><code>a = np.array([1, 0, 2, 1, 1])
  </code></pre>
  
  <p>If I do a bin count, I get integers</p>
  
  <pre><code>np.bincount(a)
  
  array([1, 3, 1])
  </code></pre>
  
  <p>But if I add weights to perform the equivalent bin count</p>
  
  <pre><code>np.bincount(a, np.ones_like(a))
  
  array([ 1.,  3.,  1.])
  </code></pre>
  
  <p>Same values but <code>float</code>.  What is the smartest way to manipulate these to <code>int</code>?  Why doesn't numpy assume the same dtype as what was passed as weights?</p>