changing the values of the diagonal of a matrix in numpy,"A.ravel()[i:max(0, A.shape[1] - i) * A.shape[1]:A.shape[1] + 1]"