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, assignments, and quick prototyping.
Built on NumPy and (optionally) SciPy, it offers easy-to-use functions for:

  • Root finding
  • Interpolation
  • Curve fitting / Approximation
  • Numerical integration
  • Numerical differentiation
  • Solving linear systems

Why use ncpy?

One package, many methods — no need to import multiple libraries
Lightweight & beginner-friendly — great for teaching & learning numerical methods
Educational — functions are implemented clearly for understanding algorithms
Fast enough — powered by NumPy for efficiency


✨ Features Overview

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


Example

  • Root finding - Newton Raphson

from ncpy import newton_raphson

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

root = newton_raphson(f, df, x0=1.0) print("Root:", root) # ~1.4142


📦 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.7.tar.gz (8.2 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.7-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ncpy-0.1.7.tar.gz
  • Upload date:
  • Size: 8.2 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.7.tar.gz
Algorithm Hash digest
SHA256 a1d64b579d6f59ddb79df8dc29660ce25669d2e16c841c4099c521313b2c721e
MD5 b561aab5217b3bb755a27ac216146527
BLAKE2b-256 78e806cb472b94a2b9bf14796f086fe6c110728b1f939db553437926c694727e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ncpy-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 8.3 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4b300ea0305fdd3ac16d070dae600ef8b400656f64c638db6538920ce8464a55
MD5 4bbe81bb0c9967b1a24bafaa18dd42e1
BLAKE2b-256 27a851cb14c01b687e48ea1e298c20ae611743cbdfe2aef7355837b2d8320afc

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