Get the diagonal of the array.
See also numpy.ndarray.diagonal().
numpy.ndarray.diagonal()
treams.util.AnnotatedArray.cumsum
treams.util.AnnotatedArray.flatten