title: python (scipy): Resizing a sparse matrix
body: <p>I'm having trouble resizing a matrix - the <code>set_shape</code> function seems to
  have no effect:</p>
  
  <pre><code>&gt;&gt;&gt; M
  &lt;14x3562 sparse matrix of type '&lt;type 'numpy.float32'&gt;'
     with 6136 stored elements in LInked List format&gt;
  &gt;&gt;&gt; new_shape = (15,3562)
  &gt;&gt;&gt; M.set_shape(new_shape)
  &gt;&gt;&gt; M
  &lt;14x3562 sparse matrix of type '&lt;type 'numpy.float32'&gt;'
     with 6136 stored elements in LInked List format&gt;
  </code></pre>
  
  <p>Anyone else come across this?</p>
  
  <p>I also tried doing this by hand, i.e.</p>
  
  <pre><code>&gt;&gt;&gt; M._shape = new_shape
  &gt;&gt;&gt; M.data = np.concatenate(M.data, np.empty((0,0), dtype=np.float32))
  </code></pre>
  
  <p>but that throws up an error:</p>
  
  <pre><code>*** TypeError: only length-1 arrays can be converted to Python scalars
  </code></pre>
  
  <p>or</p>
  
  <pre><code>&gt;&gt;&gt; M.data = np.concatenate(M.data, [])
  *** TypeError: an integer is required
  </code></pre>
  
  <p>For info:</p>
  
  <ul>
  <li>Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)</li>
  <li>scipy 0.11.0.dev-03f9e4a</li>
  </ul>