Brent's method for univariate function optimization
Project description
Brent’s method for univariate function optimization.
Example
from brent_search import brent
def func(x, s):
return (x - s)**2 - 0.8
r = brent(lambda x: func(x, 0), -10, 10)
print(r)
The output should be
(0.0, -0.8, 6)
Install
The recommended way of installing it is via conda
conda install -c conda-forge brent-search
An alternative way would be via pip
pip install brent-search
Running the tests
After installation, you can test it
python -c "import brent_search; brent_search.test()"
as long as you have pytest.
License
This project is licensed under the MIT License - see the License file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
brent-search-1.0.28.tar.gz
(7.9 kB
view details)
File details
Details for the file brent-search-1.0.28.tar.gz.
File metadata
- Download URL: brent-search-1.0.28.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfeeddb9be1450b6d3b3f42d37059a187fcdf7a9464e4a9486a86f397217017d
|
|
| MD5 |
09211d409080ea763fede66cd2056f60
|
|
| BLAKE2b-256 |
83f64c50afc599c7544c101a354b12eb4d9abd5845247506b391e7bec244ff76
|