Metadata-Version: 2.4
Name: rustylab
Version: 0.1.0
Classifier: Programming Language :: Rust
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: Operating System :: OS Independent
Classifier: License :: OSI Approved :: MIT License
License-File: LICENSE
Summary: RustyLab is a high‑performance scientific computing and machine learning library for Python, powered by a pure Rust core and exposed through PyO3.
Keywords: rustylab,rust,statistic,modeling,scientific,distribution,data,performance
Author-email: esuriddick <77727062+esuriddick@users.noreply.github.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown

<p align="center">
<img src="./images/banner.jpg" alt="RustyLab" width="100%">
</p>

<p align="center">
  <img src="https://codeberg.org/esuriddick/rustylab/actions/workflows/num_acc_testing.yml/badge.svg" alt="Numerical Accuracy Testing">
  <a href="https://codeberg.org/esuriddick/rustylab/src/branch/main/LICENSE">
    <img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT">
  </a>
</p>
<!--
<p align="center">
![PyPI version](https://img.shields.io/pypi/v/polars)
![License](https://img.shields.io/pypi/l/polars)
</p>
-->

> 🚧 RustyLab is under active development and its functionality is subject to change.

**RustyLab** is a high-performance scientific computing and machine learning library for Python, written entirely in **Rust**.

It aims to unify the core functionality of **SciPy**, **statsmodels**, and **scikit-learn** into a single, cohesive Python library with a strong focus on **speed**, **safety**, and **ergonomics**.

RustyLab is built in Rust and exposed to Python using **PyO3** and **maturin**, combining Rust’s performance with Python’s ease of use.

---

## 🚀 Why RustyLab?

The Python scientific ecosystem is powerful, but fragmented:

- Numerical routines live in **SciPy**;
- Statistical modelling in **statsmodels**;
- Machine learning in **scikit-learn**;
- Performance is built on a long-evolving foundation of native implementations and Python APIs.

RustyLab takes a different approach:

- **Pure Rust core** - memory safe, fast, and modern;
- **Polars-native data model** - designed for full compatibility with Polars;
- **Unified API** - statistics, optimization, and ML under one roof;
- **Python bindings** - no compromises in usability;
- **Performance by default** - zero-cost abstractions and parallelism;
- **Safe & predictable** - fewer runtime surprises.
- **Auditable source** – all function implementations are readily accessible, with [Wiki](https://codeberg.org/esuriddick/rustylab/wiki) references pointing to the exact code locations.

## 📦 Installation
The latest release of the Python client can be installed using `pip`.

```bash
pip install rustylab
```

## 📏 Numerical Accuracy

To ensure the highest level of numerical accuracy, all functions in RustyLab are rigorously tested using `pytest` with `pytest.approx`. The tests enforce strict tolerance thresholds:

- Relative tolerance (`rel`): `1e-12`
- Absolute tolerance (`abs`): `1e-15`

These values are chosen to align with the precision limits of `f64` (double-precision) floating-point arithmetic, ensuring that:

1. Rounding errors are accounted for while maintaining high accuracy.
2. Edge cases (e.g., near-zero or very large values) are handled robustly.
3. Consistency with scientific computing standards (e.g., SciPy/NumPy) is maintained.

This approach guarantees that RustyLab’s algorithms deliver **reliable and reproducible results** across diverse applications, from general-purpose computations to high-precision scientific workloads.

## 📚 Documentation & Module Reference

RustyLab’s full API documentation is maintained in the project's **Wiki**, which includes:

- A structured overview of all available modules.
- Documentation strings for every public function.
- Direct links to the corresponding Rust source files.
- Usage examples.

Explore the documentation here:  
👉 **RustyLab Wiki** — https://codeberg.org/esuriddick/rustylab/wiki

The Wiki is continuously updated as new features are added, making it the best place to understand the library’s capabilities.

