Extract diagonal from an array or create an diagonal array.
See also numpy.diag().
numpy.diag()
treams.util.HANDLED_FUNCTIONS
treams.util.implements