Skip to main content

A Python package for numerical computing, including root-finding, interpolation, integration, differentiation, and linear system solvers.

Project description

ncpy

PyPI Version License Downloads

ncpy — Numerical Computing in Python.

ncpy is a compact, educational Python library that implements common numerical methods for courses and quick prototyping.
It is built on top of NumPy and (optionally) SciPy, and provides easy-to-use functions for root finding, interpolation, approximation, integration, differentiation, and solving linear systems.


✨ Features

  • Root-finding: Bisection, Newton–Raphson, Secant, Fixed-point iteration
  • Interpolation: Lagrange, Newton divided differences, Linear, Cubic spline, Neville’s method
  • Approximation / Curve fitting: Polynomial least squares, Exponential fit, Logarithmic fit
  • Numerical integration: Trapezoidal, Simpson 1/3, Simpson 3/8, Romberg, Gaussian quadrature
  • Numerical differentiation: Forward, Backward, Central differences, Richardson extrapolation, Numerical gradient
  • Linear systems: Gaussian elimination, Gauss–Jordan, LU decomposition, Jacobi, Gauss–Seidel, Conjugate Gradient

Quick Example

from ncpy import roots

Example: Newton–Raphson method

f = lambda x: x**2 - 2 df = lambda x: 2*x

root = roots.newton_raphson(f, df, x0=1.0) print("Root:", root)


📦 Installation

pip install ncpy

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ncpy-0.1.4.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ncpy-0.1.4-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file ncpy-0.1.4.tar.gz.

File metadata

  • Download URL: ncpy-0.1.4.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.6

File hashes

Hashes for ncpy-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6119bfda55219c3ea6addae553c93ce6d458fc918b3dfa2dad35ab7061584f80
MD5 8941e204d76ab52f2bf209b5b1f81dec
BLAKE2b-256 24689dfe654582216b88659c89b7022c1f86026aa26c56c12acd8c2d2c93ea1e

See more details on using hashes here.

File details

Details for the file ncpy-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: ncpy-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.6

File hashes

Hashes for ncpy-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b9dedd4f38f0189ba427a3560e2808d47b9cc2595f4a0e1c0097c3db362a61a3
MD5 079e486aefabc7eca783a58b30f280b1
BLAKE2b-256 dd9a40eee1df15e356f07658121280d11382f44eddb958db4f4fd1b58d6299fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page