--- id: findiff version: "0.13.1" license: MIT license_treatment: permissive maintenance: active --- # findiff — A Python package for finite difference derivatives in any number of dimensions. License: permissive · Maintenance: active · Downloads: 84.0K/mo ## What it is and what it does findiff is a numerical differentiation library that applies finite difference stencils to numpy arrays to compute derivatives and solve PDEs. It lets you define derivative operators symbolically (e.g., d²/dx²) and apply them to data, with control over accuracy order, boundary handling, and grid periodicity. The package supports standard finite differences and newer compact (implicit) schemes that couple derivative values at neighboring points for spectral-like accuracy from small stencils. You specify a grid spacing and derivative order, then apply the operator to your data. It handles multidimensional arrays, arbitrary linear combinations of derivatives with variable coefficients, and can return matrix representations of differential operators. Recent versions added periodic boundary conditions and compact schemes with automatic stencil selection, making it suitable for both simple derivative calculations and complex PDE solving workflows. Use it for: - Compute spatial derivatives on gridded data for physics simulations or numerical analysis. - Solve time-dependent PDEs with Dirichlet or Neumann boundary conditions. - Generate finite difference coefficient tables for custom numerical schemes. - Build matrix representations of differential operators for linear algebra workflows. - Apply compact finite differences to achieve high accuracy with narrow stencils on periodic or non-periodic grids. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Computes finite difference numerical derivatives and solves partial differential equations on arrays of any dimension, with support for arbitrary accuracy orders, boundary conditions, and compact (implicit) schemes. Yes. findiff is actively maintained, has no known vulnerabilities, installs with low friction, and solves a clear problem in numerical computing. It is well-suited for anyone doing finite difference calculations or PDE solving in Python. The recent additions of compact schemes and periodic boundary conditions make it competitive for modern scientific computing tasks. ## Install pip install findiff uv add findiff poetry add findiff ## Installing findiff Before you install: Low friction: pure Python wheel with three well-established runtime dependencies (numpy, scipy, sympy). Actively maintained with recent commits and no known vulnerabilities. License in practice: MIT license is permissive; you can use, modify, and distribute findiff with minimal restrictions, including in commercial projects. Quickstart: pip install findiff import numpy as np from findiff import Diff x = np.linspace(0, 1, 100) f = np.sin(x) d_dx = Diff(0, x[1] - x[0]) df_dx = d_dx(f) Verify before relying: - Whether compact finite difference schemes (new in 0.13) offer measurable performance gains for typical PDE workloads compared to standard schemes. - Scalability characteristics when applied to very large multidimensional arrays or high-order derivatives. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 84.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags finite difference derivatives, numerical differentiation, partial differential equations solver, finite difference PDE, multidimensional derivatives, compact finite differences, spectral-like resolution, numerical-methods, pde-solver, scientific-computing [View on SkillFed](https://skillfed.io/packages/findiff) · [View on PyPI](https://pypi.org/project/findiff/)