SciPy
Section Navigation
dia_array.trace
Returns the sum along diagonals of the sparse array/matrix.
Which diagonal to get, corresponding to elements a[i, i+offset]. Default: 0 (the main diagonal).
previous
tolil
next
transpose