[Matrix-SIG] bug in Numeric.diagonal?
Tue, 17 Mar 1998 12:31:51 PST
Looking through Numeric, I noticed what looks like a bug in diagonal. Can
anyone confirm this as a bug? (I'd be happier if someone who understands
higher dimensional diagonals tested this).
def diagonal(a, offset=0, axis1=-2, axis2=-1):
if axis1 != -2: a = swapaxes(a, axis1, -2)
if axis2 != -1: a = swapaxes(a, axis2, -1)
s = __diagonal(a, offset)
if axis1 != -2: s = swapaxes(s, axis1, -2)
if axis2 != -1: s = swapaxes(a, axis2, -1) <<-- replace a with s?