Metadata-Version: 2.4
Name: mutax
Version: 0.3.1
Summary: Evolutionary optimization algorithms in JAX
Author: Gabriel S. Gerlero
Author-email: Gabriel S. Gerlero <ggerlero@cimec.unl.edu.ar>
License-Expression: Apache-2.0
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Topic :: Software Development :: Libraries
Classifier: Typing :: Typed
Classifier: Operating System :: OS Independent
Requires-Dist: equinox>=0.12.1,<0.14
Requires-Dist: jax>=0.5,<0.7
Requires-Python: >=3.10
Project-URL: Documentation, https://mutax.readthedocs.io
Project-URL: Homepage, https://github.com/gerlero/mutax
Project-URL: Repository, https://github.com/gerlero/mutax
Description-Content-Type: text/markdown

# <div align="center">Mutax</div>

**[SciPy-like](https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.differential_evolution.html) differential evolution for [JAX](https://github.com/jax-ml/jax)**

Fully [`jax.jit`](https://docs.jax.dev/en/latest/_autosummary/jax.jit.html#jax.jit)ted optimization of any JAX-compatible function. Serial and parallel execution on CPU, GPU, and TPU.

[![Documentation](https://img.shields.io/readthedocs/mutax)](https://mutax.readthedocs.io/)
[![CI](https://github.com/gerlero/mutax/actions/workflows/ci.yml/badge.svg)](https://github.com/gerlero/mutax/actions/workflows/ci.yml)
[![Codecov](https://codecov.io/gh/gerlero/mutax/branch/main/graph/badge.svg)](https://codecov.io/gh/gerlero/mutax)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![ty](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json)](https://github.com/astral-sh/ty)
[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
[![Publish](https://github.com/gerlero/mutax/actions/workflows/pypi-publish.yml/badge.svg)](https://github.com/gerlero/mutax/actions/workflows/pypi-publish.yml)
[![PyPI](https://img.shields.io/pypi/v/mutax)](https://pypi.org/project/mutax/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mutax)](https://pypi.org/project/mutax/)


## Installation

```bash
pip install mutax
```

## Quick start

```python
import jax
import jax.numpy as jnp
from mutax import differential_evolution

def cost_function(x):
    return jnp.sum(x**2)

bounds = [(-5, 5)] * 10  # 10-dimensional problem with bounds for each dimension

result = differential_evolution(cost_function, bounds, key=jax.random.key(0))
print("Best solution:", result.x)
print("Objective value:", result.fun)
```

## Documentation

The documentation is available at [Read the Docs](https://mutax.readthedocs.io/).
