--- id: pyroots version: "0.5.0" license: BSD-3-Clause license_treatment: permissive maintenance: abandoned --- # pyroots — Pure python single variable function solvers License: permissive · Maintenance: abandoned · Downloads: 122.8K/mo ## What it is and what it does Pyroots is a pure-Python library that finds roots of single-variable functions using classical numerical methods: bisection, Ridder's method, and Brent's method (with two variants). It exists as a lightweight alternative to scipy, requiring no compiled dependencies and fitting easily into standalone projects or bundled applications. The library provides a unified API across all solvers, letting you switch methods by changing a single import. You define a function taking at least one argument (the variable), specify an interval containing the root, and call the solver. It returns a result object with the root value, convergence status, iteration count, function call count, and the sequence of steps taken. The main design advantage is explicit control over precision via epsilon—you specify exactly how many digits of accuracy you want, avoiding unnecessary function evaluations that scipy might perform. Use it for: - Embedded applications or py2exe bundles where scipy's size is prohibitive and you need lightweight root-finding. - Expensive function evaluations (seconds or minutes per call) where scipy's over-convergence wastes computation. - Educational projects or numerical analysis teaching where you want transparent, readable solver implementations. - Standalone tools that need root-finding without pulling in a large scientific stack. - Functions with keyword arguments that scipy's API doesn't handle conveniently. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Implements root-finding algorithms (bisect, ridder, Brent) for single-variable functions without requiring scipy as a dependency. No—not for new projects. The package is abandoned (last update 2020-06-17, no maintenance since). While the code is simple and low-friction, scipy is now the standard, well-maintained alternative for root-finding. Use pyroots only if you have a specific constraint (extreme size limits, legacy py2exe bundling) that scipy cannot meet and you are willing to maintain a dormant dependency yourself. ## Install pip install pyroots uv add pyroots poetry add pyroots ## Installing pyroots Before you install: Low install friction with no runtime dependencies. However, the package is abandoned—last release was 2020-06-17 and no commits since then. Maintenance status is a significant concern for long-term reliability. License in practice: BSD-3-Clause is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute pyroots freely provided you retain the license notice. Quickstart: pip install pyroots from pyroots import Brentq def f(x, a): return x ** 2 - a + 1 solver = Brentq(epsilon=1e-5) result = solver(f, -3, 0, a=2) print(result.x0, result.convergence) You must provide an interval [xa, xb] that brackets the root (f(xa) and f(xb) must have opposite signs for most methods). Verify before relying: - Whether the package works reliably with Python versions beyond 3.8 given its abandoned status. - Real-world performance comparison with scipy's root-finding methods on expensive function evaluations. - Whether the claimed advantage of bundling with py2exe or similar tools remains practical in modern deployment workflows. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 122.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags root finding single variable, numerical solver bisect brent, univariate equation solver, lightweight root finder, scipy alternative root finding, brent ridder bisect algorithm, function root locator, numerical-methods, abandoned-maintenance [View on SkillFed](https://skillfed.io/packages/pyroots) · [View on PyPI](https://pypi.org/project/pyroots/)