結果 : take diagonal of matrix python