Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 1.08 KB

README.md

File metadata and controls

41 lines (29 loc) · 1.08 KB

numal

A lightweight Python library of numerical methods built on NumPy.

Requirements

  • Python >= 3.9
  • NumPy >= 1.20

Install

pip install -e .

Usage

from numal.nonlinear import bisection
from numal.integration import simpsons_13

root = bisection(lambda x: x**3 - x - 2, 1, 2)
area = simpsons_13(lambda x: 1 / (1 + x**2), 0, 1, 10)

Modules

Module Methods
numal.nonlinear bisection, secant, Newton-Raphson, Newton-Raphson for systems
numal.linear Gauss-Jordan, Gaussian elimination with partial pivoting, Gauss-Seidel, power method
numal.interpolation Newton forward, Lagrange, least squares (linear / exponential / polynomial), natural cubic spline
numal.integration trapezoidal, Simpson's 1/3, Simpson's 3/8, Boole's, Weddle's, Gauss-Legendre
numal.ode RK4 (first order), RK4 (systems / second order), shooting method, finite difference BVP
numal.pde Laplace (Gauss-Seidel), Poisson (Gauss-Seidel), heat equation (Bendre-Schmidt, Crank-Nicolson)

Tests

python -m pytest tests/