nalsb
The 10 programs from the Numerical Methods for Scientific Computing lab manual, packaged as a Python library. Ask for a program's source code with one line.
pip install nalsb
import nalsb as na
print(na.ques(4)) # program 4 (Newton-Raphson) + the lab-manual example
print(na.ans(4)) # program 4 + 2 worked examples with outputs
print(na.ques("gauss")) # names work too: all lower case, no spaces
print(na.ans("jacobi"))
na.run("simpson") # execute a program straight away
na.programs() # list numbers and names
If you prefer no quotes, import the names:
from nalsb import *
import nalsb as na
print(na.ques(gauss))
print(na.ans(jacobi))
Programs
| # | name | program |
|---|---|---|
| 1 | floating |
Floating-point errors & loss of significance |
| 2 | gauss |
Gaussian elimination with partial pivoting |
| 3 | jacobi |
Jacobi iterative method |
| 4 | newton |
Newton-Raphson method |
| 5 | lagrange |
Lagrange polynomial interpolation |
| 6 | leastsquares |
Least squares data fitting |
| 7 | simpson |
Simpson's rule integration |
| 8 | euler |
Euler's method for ODEs |
| 9 | rk4 |
Runge-Kutta (RK4) method for ODEs |
| 10 | power |
Power method for the dominant eigenvalue |
Common alternative spellings ("newtonraphson", "rungekutta", "simpsons", "lsq", ...)
are accepted as well, and so are "Gauss" or "Runge-Kutta" (case, spaces and
punctuation are ignored).
Development
pip install -e . pytest
pytest
License
GPL-3.0-or-later. Copyright (C) 2026 Lakshit Singh Bisht lakshitsinghbishttm@gmail.com.
Metadata
Release files for nalsb 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 | Actions |
|---|---|---|---|---|
| nalsb-0.1.0.tar.gz | 24.2 kB | Without provenance | Details for nalsb-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nalsb-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for nalsb-0.1.0-py3-none-any.whl |
Total release size: 50.6 kB
Release files / nalsb-0.1.0.tar.gz
| Download URL | nalsb-0.1.0.tar.gz |
|---|---|
| Size | 24.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be15f066ab5812faeecf50ff06127d9fc5e86a2a7690f6b1871b299556c1ebd0
|
|
BLAKE2b-256 checksum How to use checksums |
50db468168c6c87ca0039190735231c69278e0bf67c61d61e26a3658e11fac72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.9
|
Release files / nalsb-0.1.0-py3-none-any.whl
| Download URL | nalsb-0.1.0-py3-none-any.whl |
|---|---|
| Size | 26.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d6534ce1a8d2e0633bd70b2a06fcef711ffb5a6254b0bcc2b96b0ce56caf99cb
|
|
BLAKE2b-256 checksum How to use checksums |
562205da183732f7cf35f7861a870a7d45e1652b9e1cd1c166c56ec5950eab66
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.9
|
Security for nalsb 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.