https://github.com/fujiharuka/python-numpy-sample
https://github.com/fujiharuka/python-numpy-sample
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/fujiharuka/python-numpy-sample
- Owner: FujiHaruka
- Created: 2021-05-29T13:14:58.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-10-03T04:16:47.000Z (over 3 years ago)
- Last Synced: 2025-01-08T04:12:58.183Z (5 months ago)
- Language: Python
- Size: 46.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# numpy のスニペット
前回 https://github.com/FujiHaruka/python-csv-convert-sample
## 環境
- Python v3 以上
- numpy 1.20.3## 例
CSV ファイルで行列データを読み込んで何か行列計算をしてまた CSV ファイルとして出力する。
- [invert.py](./invert.py)
```bash
$ python invert.py input.csv output.csv
```その他、numpy の行列計算の例。
- [snippets.py](./snippets.py)
```bash
$ python snippets.py
```numpy がいかに高速か。 3000x3000の行列の逆行列を計算してみる。
```bash
$ python invert_large_matrix.py
It tooks 0.6150388717651367 seconds to calculate invert matrix of size 3000.
```