title: numpy rollaxis - how exactly does it work?
body: <p>So I was experimenting with numpy and I ran across a strange (?) behavior in the rollaxis method. </p>
  
  <pre><code>In [81]: a = np.ones((4, 3, 2))
  
  In [82]: a.shape
  Out[82]: (4, 3, 2)
  
  In [83]: x = np.rollaxis(a, 2)
  
  In [84]: x.shape
  Out[84]: (2, 4, 3)
  
  In [85]: np.rollaxis(x, -2).shape
  Out[85]: (4, 2, 3)
  </code></pre>
  
  <p>Shouldn't the -2 reverse the rollaxis? What I'm trying to do is apply a matrix that can only be applied when the 2 coordinate is first. But then I want to put my array back into its original form. The only things which I have found to work are applying <code>np.rollaxis(x, 2)</code> twice, or applying <code>np.rollaxis(x, 0, start=3)</code>. I just found these by guessing and I have no idea why they work. They also seem to be obscuring what I'm really trying to do. Could somebody please explain the way that I should 'reverse' a roll, or what I'm doing wrong?</p>
  
  <p>(Is there a pythonic way to do this?)</p>