自作の数値計算ライブラリを PyPI で公開する
応用プログラミング グループワーク企画 / 企画:testjikuji
1人1モジュール、最終回までに
pip install numerical-analysis-teamで誰でも使える形へ
この README は、いまは「企画の案内」と「参加の手順」です。最終発表のときに、利用者向けの説明に書き換えます。
やりたいこと
授業で習う数値計算の手法を自分の手で動くプログラムにして、だれでも pip install で使えるライブラリとして公開します。
!pip install numerical-analysis-team
from numerical_analysis_team import roots # 非線形方程式(見本・作成済み)
from numerical_analysis_team import pde # 偏微分方程式(企画者が担当)
from numerical_analysis_team import ... # ← ここにあなたのモジュールが入ります
- ライブラリは1つ、モジュールは1人1つ。
numerical-analysis-teamの中に、各自がファイルを1つ足します。 - 申請や登録はいりません。 PyPI の名前はもう取ってあります。
- テストと公開は自動です。 GitHub Actions が、Pull Request のたびにテストを実行し、リリースのときに PyPI へ公開します。
- マージしたらすぐ使えます。 承認待ちはなく、テストが通れば自分でマージでき、その場で Colab から
pip installできます。 - 中身は自由で、レベルは問いません。 授業の手法を1つ、教科書どおり素直に書くだけで十分です。
ねらい:授業内容を動くソフトウェアにまとめ、他人が使える形で説明できるようになること。
テーマ例
授業の回に沿った例です。ここにないテーマでもかまいません。手法の細かい一覧は 📋 授業内容チェックリスト にあります。
| テーマ例 | モジュール名の例 | 主に使う授業回 |
|---|---|---|
| 1次元偏微分方程式ソルバー(拡散・Burgers・KdV) ← 企画者 | pde |
第2、4・5、12・13、14回 |
| 非線形方程式(二分法・Newton 法・割線法) | roots(見本あり) |
第6・7回 |
| 反復解法(Jacobi 法・Gauss–Seidel 法・SOR 法・CG 法) | linalg_iterative |
第8・9回 |
| 補間(Lagrange 補間・スプライン補間) | interpolate |
第10回 |
| 数値積分(台形則・Simpson 則・Gauss 求積) | integrate |
第11回 |
| 常微分方程式(Euler 法・Runge–Kutta 法) | ode |
第12・13回 |
| 固有値計算(べき乗法・QR 法) | eigen |
第14回 |
テーマが重なったら、Issue で相談して調整しましょう。
企画者のテーマ:1次元偏微分方程式ソルバー
拡散方程式から始めて、非線形項、分散項と1つずつ足していきます。詳しくは #1。
| 拡散方程式 | 粘性 Burgers 方程式 | KdV 方程式(発展) | |
|---|---|---|---|
| 式 | u_t = α u_xx | u_t + u u_x = ν u_xx | u_t + 6u u_x + u_xxx = 0 |
| 特徴 | 線形・放物型 | 非線形項を追加 | 拡散項を分散項に |
| 解き方 | 陽解法、Crank–Nicolson 法 | Cole–Hopf 変換で熱方程式に帰着 | ソリトン解をもつ |
| 検証 | 変数分離解 e^(−απ²t) sin(πx) | 熱方程式の解から作る厳密解 | 1-ソリトン解、保存量 |
どの方程式も厳密解と比べ、格子を細かくしたときの誤差の減り方(収束次数)が理論どおりかを CI で確かめます。
参加のしかた
パソコンに Python を入れる必要はありません。 GitHub の画面でコードを書き、Google Colab で動かして確かめます。
- GitHub のアカウントを作る
- https://github.com/testjikuji をフォローする(企画者がフォロワーの一覧からあなたを見つけて、グループに招待します)
- 届いた招待を承認する
- 作るものを決めて Issue を立て、自分のブランチでモジュールとテストを書く
- Pull Request を出し、自動テストが通ったら自分でマージする
- マージした瞬間から、Colab で
pip installして使える
それぞれの手順は 📘 開発マニュアル に、画面の操作から書いてあります。書き方の約束は CONTRIBUTING.md にまとめています。
今使えるもの
| モジュール | 内容 |
|---|---|
roots |
二分法・Newton 法(反復の履歴つき) |
from numerical_analysis_team import roots
r = roots.newton(lambda x: x**2 - 2, lambda x: 2*x, x0=1.0)
r.root # 1.414213562373095
r.iterations # 反復回数
r.history # 各反復の近似値
Metadata
Release files for numerical-analysis-team 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| numerical_analysis_team-0.1.0.tar.gz | 8.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| numerical_analysis_team-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.2 kB
Release files / numerical_analysis_team-0.1.0.tar.gz
| Download URL | numerical_analysis_team-0.1.0.tar.gz |
|---|---|
| Size | 8.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
94462a90c4b02d02678455f385dc4f3cb1b87c55109738bb71fad4360ec2e183
|
|
BLAKE2b-256 checksum How to use checksums |
08df6ce8ab088c929b00c422134259e5628deef36626df2ebd7b7cf5a2cdabe0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logRelease files / numerical_analysis_team-0.1.0-py3-none-any.whl
| Download URL | numerical_analysis_team-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c8638a5341545f42effb95917ef15f5682253ad796ed50376043acd1bfb7bf76
|
|
BLAKE2b-256 checksum How to use checksums |
78fb151d99a5bf6205c0e3ecdcd204c6e52cf906609cf40fabcd1ac79eec08dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logSecurity for numerical-analysis-team 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for numerical_analysis_team-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.