numdifftools
Solves automatic numerical differentiation problems in one or more variables.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, installs cleanly with minimal dependencies, and solves a well-defined problem in numerical computing. It is a good fit if you need to compute derivatives without symbolic math or hand-coding gradients. The permissive BSD license poses no restrictions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low install friction; pure Python wheel with only numpy and scipy as runtime dependencies.
- Active maintenance with a release 2 days ago and recent commits.
License · maintenance · safety
new BSD (permissive) — Licensed under new BSD (permissive), so you can use it freely in commercial and private projects with minimal restrictions.
last release 2026-08-12 (2 days) · last repo commit 2026-08-12 · 282 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 477,954 downloads/mo, #6,440 on PyPI
Alternatives
Verify before relying
pip install numdifftools
import numdifftools as nd
import numpy as np
# Compute first derivative of exp(x) at x=1
fd = nd.Derivative(np.exp)
result = fd(1)
# Compute gradient of sum(x**2)
fun = lambda x: np.sum(x**2)
dfun = nd.Gradient(fun)
grad = dfun([1, 2, 3])- Whether the package supports automatic differentiation (AD) modes beyond finite differences, or if AlgoPy integration is optional.
- Performance characteristics for high-dimensional problems or very large Hessians.
- Whether error estimates are always reliable or have known failure modes.
What it is and what it does
Numdifftools is a numerical differentiation library that computes derivatives of any order for scalar and vector functions without requiring symbolic expressions or hand-coded gradients. It uses adaptive finite differences coupled with Richardson extrapolation to achieve high accuracy, and lets you choose between complex-step, central, forward, or backward difference schemes. The library provides high-level interfaces for common tasks like computing Jacobians, Hessians, and directional derivatives, along with error estimates on all results.
The package is built on numpy and scipy and is designed for scientific computing workflows where you need to compute derivatives of functions that are only available as Python callables. It also provides an interface to AlgoPy for algorithmic differentiation when needed. It supports Python 3.10 and later and is actively maintained.
Use it for
- Compute gradients for optimization algorithms when analytical derivatives are unavailable or expensive to derive.
- Calculate Jacobians for nonlinear least-squares fitting and parameter estimation problems.
- Evaluate Hessian matrices for second-order optimization methods and sensitivity analysis.
- Verify hand-coded derivatives by comparing them against numerical estimates.
- Compute directional derivatives and higher-order partial derivatives for scientific analysis.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, installs cleanly with minimal dependencies, and solves a well-defined problem in numerical computing. It is a good fit if you need to compute derivatives without symbolic math or hand-coding gradients. The permissive BSD license poses no restrictions.
Install
numdifftools on PyPI
Before you install
Low install friction; pure Python wheel with only numpy and scipy as runtime dependencies. Active maintenance with a release 2 days ago and recent commits.
License in practice
Licensed under new BSD (permissive), so you can use it freely in commercial and private projects with minimal restrictions.
Quickstart
pip install numdifftools
import numdifftools as nd
import numpy as np
# Compute first derivative of exp(x) at x=1
fd = nd.Derivative(np.exp)
result = fd(1)
# Compute gradient of sum(x**2)
fun = lambda x: np.sum(x**2)
dfun = nd.Gradient(fun)
grad = dfun([1, 2, 3])
Verify before relying
- Whether the package supports automatic differentiation (AD) modes beyond finite differences, or if AlgoPy integration is optional.
- Performance characteristics for high-dimensional problems or very large Hessians.
- Whether error estimates are always reliable or have known failure modes.
Package facts
| License | new BSD permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 2 packagesnumpyscipy |
| Maintenance | Actively maintained 2 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 477,954 / month, #6,440 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Environment :: ConsoleIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: OS IndependentOperating System :: POSIX :: LinuxOperating System :: UnixProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering :: GISTopic :: Scientific/Engineering :: Mathematics |
Evidence: numdifftools-0.10.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “hessian matrix”
- numdifftoolsComputes numerical derivatives, gradients, Jacobians, Hessians, and…
- sparsediffpySparseDiffPy provides Python bindings to compute sparse Jacobians and…
- lineaxLineax solves linear systems and least-squares problems in JAX,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Mathematics packages
NetworkX provides data structures and algorithms for creating, analyzing, and manipulating graphs and networks, supporting everything from simple undirected graphs to complex directed and weighted networks.
kiwisolver is a Python binding to a fast C++ implementation of the Cassowary constraint solver, enabling you to solve systems of linear constraints and inequalities.
Install it if you need to solve constraint systems; skip it if you only need simple linear algebra.
SymPy is a Python library for symbolic mathematics, performing algebraic manipulation, calculus, equation solving, and mathematical expression simplification without numerical approximation.
ContourPy calculates contours of 2D quadrilateral grids using C++11 algorithms wrapped in Python, offering serial and multithreaded implementations without requiring Matplotlib as a dependency.
PyTorch provides GPU-accelerated tensor computation and automatic differentiation for building and training deep neural networks in Python.
onnxruntime loads and executes Open Neural Network Exchange (ONNX) models with a focus on inference performance across CPUs and accelerators.
Install it if you have ONNX models to run in production or development.
See also autograd · findiff · sparsediffpy · casadi · autograd-gamma · uncertainties · drjit · Theano · AeroSandbox · audmath