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.6.tar.gz (7.8 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.6-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ncpy-0.1.6.tar.gz
  • Upload date:
  • Size: 7.8 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.6.tar.gz
Algorithm Hash digest
SHA256 bbceb4f4298992b96b1f69eab403dbd8cea91885ce9dcace57afc8d1059b8a85
MD5 ca4a7d3070320304ee2363b090eacca5
BLAKE2b-256 97e4698dadf9193e780d257594c04e0fc59f86346420e5cb76aaeaf6cd47907d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ncpy-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 8.0 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 6d845a6a1dea96849bbe4b5e5ec3dfa692b357a4e6322334b8f7c848c1708814
MD5 434dd21086dec7a7b202464b54974a67
BLAKE2b-256 5f270e58ce61598dbd97354ed569e63233ec0e2064c3fa9f92eaa51118a66efa

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