Metadata-Version: 2.4
Name: fastscipy
Version: 0.1.0a1
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: MacOS
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Rust
Classifier: Topic :: Scientific/Engineering
Requires-Dist: numpy>=2.5,<2.6
Requires-Dist: scipy>=1.18,<1.19
Requires-Dist: pillow>=10.1 ; extra == 'bench'
Requires-Dist: pillow>=10.1 ; extra == 'gallery'
Requires-Dist: matplotlib>=3.8 ; extra == 'gallery'
Requires-Dist: pytest ; extra == 'test'
Requires-Dist: pytest-xdist ; extra == 'test'
Requires-Dist: hypothesis ; extra == 'test'
Provides-Extra: bench
Provides-Extra: gallery
Provides-Extra: test
License-File: LICENSE
License-File: LICENSES/scipy-LICENSE.txt
Summary: Drop-in acceleration for SciPy: byte-identical results, faster on one core and on many
Keywords: scipy,performance,rust,multithreading,drop-in,ndimage
Author: Michael Li
License-Expression: BSD-3-Clause
Requires-Python: >=3.12, <3.15
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Benchmarks, https://github.com/michael-L-i/fastscipy/blob/main/bench/RESULTS.md
Project-URL: Homepage, https://github.com/michael-L-i/fastscipy
Project-URL: Issues, https://github.com/michael-L-i/fastscipy/issues
Project-URL: Source, https://github.com/michael-L-i/fastscipy

# fastscipy

**Faster SciPy calls. The same results, byte for byte.**

Rust kernels and shared thread pools accelerate supported calls. Everything
else stays with SciPy.

```python
import fastscipy
fastscipy.patch()

from scipy import ndimage
clean = ndimage.median_filter(image, size=3)
```

![Image cleanup with SciPy and fastscipy](https://raw.githubusercontent.com/michael-L-i/fastscipy/main/docs/median-filter-demo.gif)

*Run on a MacBook Pro with M5 Pro.*

[Explore eight more examples →](https://github.com/michael-L-i/fastscipy/blob/main/examples/README.md)

## Install

```sh
pip install --pre fastscipy
```

Prebuilt wheels; no Rust required.

**Experimental: macOS 14+ Apple Silicon · SciPy 1.18 · Python 3.12–3.14.**
Unsupported platforms and versions stay unpatched.

Call `patch()` before importing libraries that use SciPy.
Use `patch(threads=4)` to choose a thread budget, `status()` to see what's enabled,
and `unpatch()` to restore SciPy.

## Performance

Geometric-mean speedups over unpatched SciPy, measured on an Apple M5 Pro.

| Area | Cases | 1 thread | 18 threads |
|---|---:|---:|---:|
| linalg — stacks of small matrices | 19 | 10.0× | 75.9× |
| ndimage | 41 | 13.3× | 68.2× |
| interpolate | 12 | 15.6× | 44.3× |
| csgraph | 9 | 5.8× | 15.5× |
| signal | 22 | 4.7× | 12.4× |
| sparse | 16 | 4.7× | 11.9× |
| stats | 46 | 7.0× | 9.3× |
| special | 32 | 1.0× | 7.4× |
| spatial | 8 | 1.0× | 6.7× |
| integrate | 3 | 1.6× | 1.6× |
| optimize | 3 | 1.1× | 1.1× |

Published run: 2026-10-18, SciPy 1.18.1, Python 3.13, release build; controls
excluded. Results vary by workload and hardware.
[Full results](https://github.com/michael-L-i/fastscipy/blob/main/bench/RESULTS.md) · [Latest expansion results](https://github.com/michael-L-i/fastscipy/blob/main/bench/README.md)

## More

[Coverage](https://github.com/michael-L-i/fastscipy/blob/main/docs/coverage.md) · [How it works](https://github.com/michael-L-i/fastscipy/blob/main/docs/design.md) ·
[Demo source](https://github.com/michael-L-i/fastscipy/blob/main/examples/median_filter.py) · [Contributing](https://github.com/michael-L-i/fastscipy/blob/main/CONTRIBUTING.md)

BSD-3-Clause. SciPy ports retain [SciPy's license](https://github.com/michael-L-i/fastscipy/blob/main/LICENSES/scipy-LICENSE.txt).
Independent of the SciPy project.

