title: In-place sorting of csc_matrix columns
body: <p>I want to be able to sort columns of a scipy sparse matrix. The scipy documentation is fairly terse, and I can't see much concerning modification of the matrix. On SO I found this <a href="https://stackoverflow.com/questions/10007463/sorting-in-sparse-matrix">post</a>, but the answer given returns a <code>list</code></p>
  
  <p>The code that I want to write is</p>
  
  <pre><code>s = rand(4, 4, density=0.25, format='csc')
  
  _,colSize = s.get_shape()    
  for j in range(0,colSize):
     s.setcol(j, sorted(s.getcol(j), key=attrgetter('data'), reverse=True))
  </code></pre>
  
  <p>Except there is no <code>setcol</code> and <code>sorted</code> doesn't return the same type as <code>getcol</code>.</p>
  
  <p>As an example of what I'd like to get, if I have in input</p>
  
  <pre><code>&lt;class 'scipy.sparse.csc.csc_matrix'&gt;
  [[ 0.          0.33201655  0.          0.        ]
   [ 0.          0.          0.          0.        ]
   [ 0.          0.81332962  0.          0.50794041]
   [ 0.          0.41478979  0.          0.        ]]
  </code></pre>
  
  <p>then the output that I want is</p>
  
  <pre><code>[[ 0.          0.81332962    0.          0.50794041]
   [ 0.          0.414789790.  0.          0.        ]
   [ 0.          0.332016550.  0.          0.        ]
   [ 0.          0.            0.          0.        ]]
  </code></pre>
  
  <p>(It doesn't have to be a csc matrix, I assumed that this would be better for column manipulations)</p>