Multiplying column elements of sparse Matrix
<p>I have a sparse csc matrix with many zero elements for which I would like to compute the product of all column elements for each row.</p>

<p>i.e.:</p>

<pre><code> A = [[1,2,0,0],
      [2,0,3,0]]
</code></pre>

<p>should be converted to:</p>

<pre><code>V = [[2,
      6]]
</code></pre>

<p>Using a numpy dense matrix this can be accomplished by replacing all zero values with one values and using <code>A.prod(1)</code>. This is however not a option since the dense matrix would be too large.</p>

<p>Is there any way to accomplish this without converting the sparse matrix into a dense one? </p>