Metadata-Version: 2.4
Name: smolpack
Version: 0.1.1
Summary: Multidimensional Quadrature Using Sparse Grids for Python
Keywords: sparse,grids,numerical,integration
Author-Email: John Burkardt <jvb25@pitt.edu>
Maintainer-Email: Saud Zahir <m.saud.zahir@gmail.com>, M Laraib Ali <laraibg786@outlook.com>
License-Expression: LGPL-2.1
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: C
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: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Operating System :: MacOS
Project-URL: homepage, https://eggzec.github.io/smolpack
Project-URL: documentation, https://eggzec.github.io/smolpack/api/
Project-URL: source, https://github.com/eggzec/smolpack
Project-URL: releasenotes, https://github.com/eggzec/smolpack/releases/latest
Project-URL: issues, https://github.com/eggzec/smolpack/issues
Requires-Python: >=3.10
Requires-Dist: numpy
Description-Content-Type: text/markdown

# smolpack

**Multidimensional Quadrature Using Sparse Grids for Python**

[![Tests](https://github.com/eggzec/smolpack/actions/workflows/test.yml/badge.svg)](https://github.com/eggzec/smolpack/actions/workflows/test.yml)
[![Documentation](https://github.com/eggzec/smolpack/actions/workflows/docs.yml/badge.svg)](https://github.com/eggzec/smolpack/actions/workflows/docs.yml)
[![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)

[![codecov](https://codecov.io/github/eggzec/smolpack/graph/badge.svg)](https://codecov.io/github/eggzec/smolpack)
[![License: LGPL-2.1](https://img.shields.io/badge/License-LGPL--2.1-blue.svg)](LICENSE)

[![PyPI Downloads](https://img.shields.io/pypi/dm/smolpack.svg?label=PyPI%20downloads)](https://pypi.org/project/smolpack/)
[![Python versions](https://img.shields.io/pypi/pyversions/smolpack.svg)](https://pypi.org/project/smolpack/)

`smolpack` is a high-performance Python library for numerical integration
(cubature) over the unit hypercube [0,1]^d using
[Smolyak's algorithm](https://en.wikipedia.org/wiki/Sparse_grid) with
Clenshaw-Curtis quadrature rules. It approximates integrals of the form:

$$I[f] = \int_{[0,1]^d} f(\mathbf{x})\,d\mathbf{x}$$

Two solvers are provided: a **delayed Clenshaw-Curtis** variant (fewer
evaluations) and a **standard Clenshaw-Curtis** variant (classical rule).

## Quick example

```python
import numpy as np
import smolpack

def my_func(dim, x):
    return np.exp(np.sum(x))

result = smolpack.int_smolyak(my_func, dim=3, qq=5)
```

## Installation

```bash
pip install smolpack
```

Requires Python 3.10+ and NumPy. See the
[full installation guide](https://eggzec.github.io/smolpack/installation/) for
uv, poetry, and source builds.

## Documentation

- [Theory](https://eggzec.github.io/smolpack/theory/) — sparse grids, Smolyak construction, Clenshaw-Curtis rules
- [Quickstart](https://eggzec.github.io/smolpack/quickstart/) — runnable examples
- [API Reference](https://eggzec.github.io/smolpack/api/) — solver signatures and parameters
- [References](https://eggzec.github.io/smolpack/references/) — literature citations

## Attribution

The original C library SMOLPACK was written by Knut Petras and is distributed
via [John Burkardt's page](https://people.math.sc.edu/Burkardt/c_src/smolpack/smolpack.html).

## License

LGPL-2.1 — see [LICENSE](LICENSE).
