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.3.tar.gz (4.0 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.3-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ncpy-0.1.3.tar.gz
  • Upload date:
  • Size: 4.0 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.3.tar.gz
Algorithm Hash digest
SHA256 ee6e2f30380012dc9c1b07a7545bf05074236175abdf9874084a00b0f212466a
MD5 0a842e9ad5cc1ab6fa1ef38675615d1a
BLAKE2b-256 77c28236c0a1eb5fcd917120b3b686ea8e7dc403c170a8e62f065df793921202

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ncpy-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8a068f509cc6a12b15bc54486a0fff8c953928ccb62caf416641f1465e262517
MD5 f1a9baf06672c0430f4d84ed4a2932d0
BLAKE2b-256 d7148c8424ccaa5746d56aad122826afe5de4dc75716c76d399ab4291f5dee88

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