title: Shuffling NumPy array along a given axis
body: <p>Given the following NumPy array,</p>
  
  <pre><code>&gt; a = array([[1, 2, 3, 4, 5], [1, 2, 3, 4, 5],[1, 2, 3, 4, 5]])
  </code></pre>
  
  <p>it's simple enough to shuffle a single row,</p>
  
  <pre><code>&gt; shuffle(a[0])
  &gt; a
  array([[4, 2, 1, 3, 5],[1, 2, 3, 4, 5],[1, 2, 3, 4, 5]])
  </code></pre>
  
  <p>Is it possible to use indexing notation to shuffle each of the rows independently? Or do you have to iterate over the array. I had in mind something like,</p>
  
  <pre><code>&gt; numpy.shuffle(a[:])
  &gt; a
  array([[4, 2, 3, 5, 1],[3, 1, 4, 5, 2],[4, 2, 1, 3, 5]]) # Not the real output
  </code></pre>
  
  <p>though this clearly doesn't work.</p>