title: Element-wise power of scipy.sparse matrix
body: <p>How do I raise a <code>scipy.sparse</code> matrix to a power, element-wise? <code>numpy.power</code> should, according to <a href="http://docs.scipy.org/doc/numpy/reference/generated/numpy.power.html#numpy.power" rel="noreferrer">its manual</a>, do this, but it fails on sparse matrices:</p>
  
  <pre><code>&gt;&gt;&gt; X
  &lt;1353x32100 sparse matrix of type '&lt;type 'numpy.float64'&gt;'
          with 144875 stored elements in Compressed Sparse Row format&gt;
  
  &gt;&gt;&gt; np.power(X, 2)
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
    File ".../scipy/sparse/base.py", line 347, in __pow__
      raise TypeError('matrix is not square')
  TypeError: matrix is not square
  </code></pre>
  
  <p>Same problem with <code>X**2</code>. Converting to a dense array works, but wastes precious seconds.</p>
  
  <p>I've had the same problem with <code>np.multiply</code>, which I solved using the sparse matrix's <code>multiply</code> method, but there seems to be no <code>pow</code> method.</p>