You cannot convert the sparse matrix to a dense array just to compute column-wise sums. That would blow the memory on non trivial data. Please find a way that does not involve any memory copy nor any materialization of the zeros of the sparse matrix. The following might work:

```python
np.array(a.sum(axis=1)).ravel()
```