結果 : check if matrix is diagonal python