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.5.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.5-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ncpy-0.1.5.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.5.tar.gz
Algorithm Hash digest
SHA256 c95cc79e2b5851002aba032997a39d7a91b6243f01dd61b79840336b2d4777f1
MD5 9cf8e95ae830b8ce83f478aaed6e195c
BLAKE2b-256 ca7deebe2b93a59972168da25c353bd7a3560b95f3947fa7906154ada0ae82e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ncpy-0.1.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 356e1439a0a1fb7394d071eb01f47fc3734f0176545c96491b1afd0f9ed2a5ea
MD5 538a1f6903e3f0617fb1d725c37b3290
BLAKE2b-256 4bea8778b1320047e4b861007315fb1a905cd67806d162ef605db5b9c5639d16

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