I thought this problem had a trivial solution, couple of for loops and some fancy counters, but apparently it is rather more complicated.
So my question is, how woul
Just in case somebody needs to do this in python, it is very easy using numpy:
#M is a square numpy array for i in range(-M.shape[0]+1, M.shape[0]): print M.diagonal(offset=i)