title: Difference between array[i][:] and array[i,:]
body: <p>I'm new to python, so I'm used to use <code>array[i][j]</code> instead of <code>array[i,j]</code>. Today a script I created following a tutorial was not working until I found out that I was using</p>
  
  <pre><code>numpy.dot(P[0][:], Q[:][0])
  </code></pre>
  
  <p>instead of</p>
  
  <pre><code>numpy.dot(P[0,:], Q[:,0])
  </code></pre>
  
  <p>For some reason the second one works, while the first one gives me a shape error. The matrixes dimensions are MxK and KxN.</p>
  
  <p>I tried to print both <code>P[0][:]</code> and <code>P[0,:]</code>, run <code>id()</code>, <code>type()</code> and <code>P[0][:].shape</code>, but couldn't find a reason to it. Why are these things different?</p>
  
  <p>I'm running it on Jupyter Notebook 4.3.0 and Python 2.7.13.</p>