title: numpy.digitize returns values out of range?
body: <p>I am using the following code to digitize an array into 16 bins:</p>
  
  <pre><code>numpy.digitize(array, bins=numpy.histogram(array, bins=16)[1])
  </code></pre>
  
  <p>I expect that the output is in the range [1, 16], since there are 16 bins. However, one of the values in the returned array is 17. How can this be explained?</p>