Registry / ai-ml / pyroots

pyroots

JSON →
library0.5.0pypypi✓ verified 82d ago

Pure Python single-variable function solvers. Provides root-finding algorithms such as bisection, Newton-Raphson, secant, and others. Current version: 0.5.0. Release cadence is low (last release 2021).

pip install pyroots
INSTALL
IMPORT
SIG · PYROOTS
P
pyroots
ai-mlpythonv0.5.0
Install
1.5s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.5.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Bisect
from pyroots import Bisect
from pyroots import bisection
Brenth
from pyroots import Brenth
Ridder
from pyroots import Ridder

Find a root of f(x)=x^3 - 2x -5 in interval [2,3] using bisection.

from pyroots import bisection def f(x): return x**3 - 2*x - 5 root = bisection(f, 2, 3) print(f"Root: {root:.6f}")
Debug
Known issues
deprecatedThe 'methods' submodule (e.g., from pyroots.methods import bisection) is deprecated; use top-level imports (from pyroots import bisection).
fix
Use 'from pyroots import bisection' instead.
affects: <=0.4.0
gotchaAll solvers require a function that returns a scalar; they do not support vectorized functions or arrays. Passing a vector will fail.
fix
Ensure your function f(x) returns a single float, not a list or numpy array.
affects: all
gotchaFlexible tolerance 'xtol' behavior: bisection uses 'xtol' as absolute tolerance; newton uses 'xtol' for step size. Inconsistent across methods – check source if expecting identical semantics.
fix
Read docstring of each solver to confirm tolerance behavior.
affects: all
deprecatedSupport for Python 2.7 and 3.5 is deprecated; future releases may drop it.
fix
Use Python >=3.6.
affects: >=0.5.0
Upgrade
Version history
0.5.0latest on PyPI · released Jun 17, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
22 hits · last 30 days
node
20
OpenAI (training)
1
Resources
pyroots — pip install pyroots · libregistry