Skip to main content

Brent's method for univariate function optimization.

Project description

PyPI-License PyPI-Version Anaconda-Version Anaconda-Downloads 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.18.tar.gz (7.4 kB view details)

Uploaded Source

File details

Details for the file brent-search-1.0.18.tar.gz.

File metadata

  • Download URL: brent-search-1.0.18.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for brent-search-1.0.18.tar.gz
Algorithm Hash digest
SHA256 f215346451d2e47aa8b2bc47c0e99887c64997277e00ec8171ce38a5daa0b99e
MD5 331eae2b80a224dad6b817722c491426
BLAKE2b-256 6644dfe1d0768d88b7703b057afe0690243d6290021e14bd5cc51c068e941154

See more details on using hashes here.

Supported by

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