### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Sparse matrices (`scipy.sparse`) »
- scipy.sparse.dia_matrix »

# scipy.sparse.dia_matrix.sum

`dia_matrix.``sum`(axis=None)

  Sum the matrix over the given axis. If the axis is None, sum over both rows and columns, returning a scalar.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.12 Reference Guide (DRAFT) »
- Sparse matrices (`scipy.sparse`) »
- scipy.sparse.dia_matrix »