banana-bench
A comprehensive collection of 55+ standard mathematical benchmark functions for testing and evaluating optimization algorithms.
Why "banana-bench"? Rosenbrock's function — one of the most famous test functions in optimization, and part of this suite (
rosenbrock) — is nicknamed the "banana function" for its curved, banana-shaped valley. This is the bench you run your optimizer through.
📚 Documentation
Detailed documentation is available in the docs/ directory:
- User Guide & Examples: Detailed tutorials on metadata, benchmarking, and utilities.
- Function Reference: Complete guide to all 55+ functions with domains and global minima.
- Visualization Gallery: Examples of all plotting and analysis tools.
- API Reference: Class and function definitions.
🎯 Features
- 55+ Benchmark Functions: Multimodal, Unimodal, and Special functions.
- Rich Metadata: Access bounds, dimensions, known minima programmatically.
- Visualization: 2D/3D plots, convergence tracking, and heatmaps.
- Benchmarking Tools: Automated testing with
BenchmarkRunner. - Zero Core Dependencies: Only NumPy is required.
📦 Installation
From PyPI
pip install banana-bench
From Source
git clone https://github.com/ak-rahul/banana-bench.git
cd banana-bench
pip install -e .
To install with visualization support:
pip install banana-bench[viz]
🚀 Quick Start
import numpy as np
from bananabench import ackley, BenchmarkRunner
# 1. Use a single function
x = np.zeros(5)
print(f"Ackley(0) = {ackley(x)}")
# 2. Run a benchmark suite
def my_optimizer(func, bounds):
# Your optimization logic here...
return np.zeros(len(bounds)), 0.0
runner = BenchmarkRunner(my_optimizer, "MyAlgo", n_runs=5)
results = runner.run_suite(functions=['sphere', 'ackley'])
For detailed usage, see the User Guide.
Metadata
Release files for banana-bench 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| banana_bench-0.1.0.tar.gz | 72.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| banana_bench-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 111.2 kB
Release files / banana_bench-0.1.0.tar.gz
| Download URL | banana_bench-0.1.0.tar.gz |
|---|---|
| Size | 72.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82b9fe6fe42c8a8f1ff1e60c632da7ed30b1b3e9147e226d93ea6f9ef09b96fb
|
|
BLAKE2b-256 checksum How to use checksums |
139b4258dafe4ca03c99f63ab93e57d444c18b6a81dac6fabe7c64293b8f7dbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logRelease files / banana_bench-0.1.0-py3-none-any.whl
| Download URL | banana_bench-0.1.0-py3-none-any.whl |
|---|---|
| Size | 39.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9bb6c01d1c237d5b9b8da3dc5dfe9c38bcc08417d3c40335222186562de39771
|
|
BLAKE2b-256 checksum How to use checksums |
f63a0c5342182bf8e8ccbd04982c655dccba31fde63d304ff00434a6132c4d77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency log