title: Sequential random choice in Python
body: <p>I want to randomly choose from an array but the requirement is that the elements of the output array will increase by one (and start at zero). For example, if I want to get 5 numbers between 0 and 5 then one could do</p>
  
  <pre><code>np.random.choice(np.arange(6), 5)
  array([5, 0, 5, 2, 5])
  </code></pre>
  
  <p>where, in this case, I would like this to be:</p>
  
  <pre><code>array([2, 0, 2, 1, 2])
  </code></pre>
  
  <p>Another example, if </p>
  
  <pre><code>np.random.choice(np.arange(6), 5)
  array([1, 1, 1, 4, 2])
  </code></pre>
  
  <p>I am trying to "rebase" this in such a manner that it will be</p>
  
  <pre><code>array([0, 0, 0, 2, 1])
  </code></pre>
  
  <p>Final example...select 15 numbers between 0 and 5</p>
  
  <pre><code>np.random.choice(np.arange(6), 15)
  array([4, 5, 3, 0, 4, 5, 3, 0, 2, 5, 2, 3, 2, 4, 4])
  </code></pre>
  
  <p>where eventually I want to end up with</p>
  
  <pre><code>array([3, 4, 2, 0, 3, 4, 2, 0, 1, 4, 1, 2, 1, 3, 3])
  </code></pre>