Skip to main content

Brent's method for univariate function optimization.

Project description

PyPIl PyPIv Anaconda-Server Badge Documentation Status

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.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details

Project details


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.14.tar.gz (7.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page