Next:
Inserting diagonal elements
Up:
A sampling of useful
Previous:
Extracting part of a
Trace
The trace of a square matrix is the sum of the diagonal elements.
>>> print np.trace(C) 15