title: Using numpy to Obtain Submatrix
body: <p>I'm trying to do the following with <code>numpy</code> (python newbie here)</p>
  
  <h2>Create a zeroed matrix of the rigth dimensions</h2>
  
  <pre><code>num_rows = 80
  num_cols = 23
  A = numpy.zeros(shape=(num_rows, num_cols))
  </code></pre>
  
  <h2>Operate on the matrix</h2>
  
  <pre><code>k = 5
  numpy.transpose(A)
  U,s,V = linalg.svd(A)
  </code></pre>
  
  <h2>Extract sub-matrix</h2>
  
  <pre><code> sk = s[0:(k-1), 0:(k-1)]
  </code></pre>
  
  <h3>Results on error</h3>
  
  <pre><code>Traceback (most recent call last):
  File "tdm2svd.py", line 40, in &lt;module&gt;
  sk = s[0:(k-1), 0:(k-1)]
  IndexError: too many indices
  </code></pre>
  
  <p>What am I doing wrong?</p>