Last active
October 7, 2018 11:10
-
-
Save yosh1/70e6967096175685ffa623a9cf873695 to your computer and use it in GitHub Desktop.
Pythonで規則性のある数値を読み込み→行列に変換する方法 ref: https://qiita.com/yoshi1125hisa/items/682757cdbeb4502e6aca
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 1 1 | |
2 2 2 | |
3 3 3 | |
4 4 4 | |
5 5 5 | |
6 6 6 | |
7 7 7 | |
8 8 8 | |
9 9 9 | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
d = np.loadtxt('text.txt', dtype='int').reshape(-1,5).T |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment