結果 : write matrix to file python