Numerical methods for engineers in Python: built to be studied and understood, not just used.
Project description
NuMethods
Numerical methods for engineers in Python – built to be studied and understood, not just used.
About
This library implements classical numerical methods used in engineering: root finding, linear systems, optimization, integration, differential equations, and more. The goal is a personal reference that surfaces the intermediate steps that production libraries hide – iteration history, convergence behavior, per-step error estimates – so that the method itself remains visible and inspectable.
Production libraries such as SciPy solve efficiently but return only the final result. NuMethods is a companion for anyone who wants to understand how a method works, not just that it works.
NumPy is the single low-level dependency. All numerical methods are built strictly on top of it.
Installation
pip install numethods
uv add numethods
Quick Start
import numpy as np
from numethods.roots.bracketing_methods import bisection
# Terminal velocity of a falling parachutist (drag coefficient unknown)
def f(c):
return (667.38 / c) * (1 - np.exp(-0.146843 * c)) - 40
result = bisection(f, xl=12, xu=16, verbose=True)
# ------------------------------------------------------------------------------------------------
# Bisection method iterations
# ------------------------------------------------------------------------------------------------
# i | xl | xu | xr | ea
# 1 | 12.0000000000000000 | 16.0000000000000000 | 14.0000000000000000 | 0.1428571428571429
# 2 | 14.0000000000000000 | 16.0000000000000000 | 15.0000000000000000 | 0.0666666666666667
# ...
print(result.solution) # 14.780208468437195
print(result.nit) # number of iterations
print(result.nfev) # number of function evaluations
# Full iteration history is available
for step in result.history:
print(step.i, step.sol, step.ea)
Topics
Currently implemented: bracketing methods for root finding (bisection and false position).
See ROADMAP.md for the full list of topics planned.
License
MIT
Author
Francisco Corrêa Dias
PhD in Civil Engineering – PUC-Rio
Researcher in Computational Mechanics
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file numethods-0.1.0.tar.gz.
File metadata
- Download URL: numethods-0.1.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
12769980d5dbf6ed1a0766d02c24d4634090643b56966b9166c09c96f44b8739
|
|
| MD5 |
78fca4e5388336eb1c3a7873dfd41695
|
|
| BLAKE2b-256 |
9f9fd73fd214925b834184b5a5c3aed4ec079150faaac618176e2ac02c1b91d5
|
File details
Details for the file numethods-0.1.0-py3-none-any.whl.
File metadata
- Download URL: numethods-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
650833fb9bc25ac569b61a5c1a540b78c7d240dd45e4f404bbb701d75bb51e37
|
|
| MD5 |
91a87e8adca5b72948e3aa01d600a827
|
|
| BLAKE2b-256 |
e3a9673c60c7086804902ce2bb3e528911a76cd63088e4f3b8e5cc7a9b5aa812
|