Metadata-Version: 2.2
Name: disco-sparse-array
Version: 0.1.1
Summary: Sparse vector and matrix classes with fast operations for Disco simulations
Author: Michiel Jansen
License: MIT
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: C++
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Requires-Dist: numpy>=1.23
Requires-Dist: pandas>=2.3
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: pytest-cov>=5; extra == "dev"
Requires-Dist: mypy>=1.10; extra == "dev"
Requires-Dist: cibuildwheel>=2.20; extra == "dev"
Requires-Dist: pybind11-stubgen>=2.5; extra == "dev"
Description-Content-Type: text/markdown

# 🧮 sparse-array

**Sparse vector and matrix classes with fast C++/NumPy-backed operations**  
for use in **Disco** simulation programs and other large-scale discrete event models.

[![PyPI](https://img.shields.io/pypi/v/disco-sparse-array.svg)](https://pypi.org/project/disco-sparse-array/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Build](https://github.com/michielmj/disco-sparse-array/actions/workflows/build.yml/badge.svg)](https://github.com/michielmj/disco-sparse-array/actions)
[![Tests](https://github.com/michielmj/disco-sparse-array/actions/workflows/test.yml/badge.svg)](https://github.com/michielmj/disco-sparse-array/actions)

---

## Overview

`disco-sparse-array` provides compact **sparse vector** and **sparse matrix** types that operate efficiently on large, structured numerical data.  
The package is optimized for repeated arithmetic and transformation operations that occur during **Monte Carlo and discrete-event simulations**, as used in the **Disco** simulation framework.

It combines:
- Lightweight **Python classes** for usability.
- **C++/pybind11 kernels** for compute-intensive operations.
- **NumPy interoperability** for zero-copy exchange of data.

---

## ✨ Features

- Sparse **Vector** and **Matrix** classes with explicit indices and values.
- Fast arithmetic:
  - `a + b`, `a @ m`, and in-place variants.
- Change detection and subset validation (`diff`, `changes`).
- Conversion utilities:
  - Sparse → dense arrays (`to_dense`).
  - Dense → sparse (via index filtering).
- Consistent API and predictable semantics across all operations.
- MIT-licensed, pure Python/C++ — no external runtime dependencies beyond NumPy.

---

## 🚀 Installation

```bash
pip install disco-sparse-array
