title: Numpy index slice without losing dimension information
body: <p>I'm using numpy and want to index a row without losing the dimension information.</p>
  
  <pre><code>import numpy as np
  X = np.zeros((100,10))
  X.shape        # &gt;&gt; (100, 10)
  xslice = X[10,:]
  xslice.shape   # &gt;&gt; (10,)  
  </code></pre>
  
  <p>In this example xslice is now 1 dimension, but I want it to be (1,10).
  In R, I would use X[10,:,drop=F]. Is there something similar in numpy. I couldn't find it in the documentation and didn't see a similar question asked.</p>
  
  <p>Thanks!</p>