Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adonath/array-brentq
An array based implementation of Brent's method
https://github.com/adonath/array-brentq
Last synced: 19 days ago
JSON representation
An array based implementation of Brent's method
- Host: GitHub
- URL: https://github.com/adonath/array-brentq
- Owner: adonath
- License: bsd-3-clause
- Created: 2023-10-05T14:59:44.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-09T14:55:08.000Z (about 1 year ago)
- Last Synced: 2024-10-28T08:12:00.296Z (2 months ago)
- Language: Python
- Size: 56.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Array Brentq
An array based implementation of Brent's method. It is checked for correctness against Scipy's implementation
in the file `test_brentq_array.py`.# Some Notes
- The implementation relies on the [Python Array API](https://data-apis.org/array-api/2022.12/).
- I offered to contribute this to Scipy: https://github.com/scipy/scipy/issues/19354. Here is the related issue: https://github.com/scipy/scipy/issues/7242
- Scipy currently (Oct 2023) has a private implementatiom of Chandrupatla's method (https://github.com/scipy/scipy/blob/166e1f2b1ea0a1a2c3d7b030bd829549f8a5844a/scipy/optimize/_zeros_py.py#L1789), which I have not tested yet.# Benchmark
This is a benchmark of the array based implementation of Brent's method agains the naive Python loop and using Scipy's implementation. The benchmark was executed on an M1 Macbook Pro with 16GB of RAM.![benchmark](benchmark.png)