title: Scipy equivalent of numpy where for sparse matrices
body: <p>I am looking for an equivalent of <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.where.html" rel="nofollow"><code>numpy.where</code></a> to be used with the sparse representations that scipy offers (<a href="http://docs.scipy.org/doc/scipy/reference/sparse.html" rel="nofollow"><code>scipy.sparse</code></a>).
  Is there anything that lets you deal with those matrices as if you where using an if-then-else statement?</p>
  
  <p><strong><em>UPDATE</em></strong>
  To be more specific: I need <code>where</code> as an if-then-else vectorialized function, i.e. in tasks like, for each value that equals K in matrix A, put a corresponding value in matrix B, else C.
  You could use something like <code>find</code> to retrieve the indexes of those entries that satisfy the logical condition, then negate them to find all the remaining ones, but for sparse matrices, isn't there a more compact way?</p>