Skip to main content

PyPI Docs CI

manifolds-rs

Dimensionality reduction for single-cell and computational biology. The Rust crate does the work; this is a scikit-learn shaped layer over it.

Eight algorithms on the CPU, three of them with GPU variants where the neighbour search and the Adam update move to the device. No CUDA runtime to install: the GPU backend is wgpu, so it runs on Metal, Vulkan or DX12 and ships in the ordinary wheel.

Documentation: https://gregorlueg.github.io/manifolds-rs/

This package versions separately from the Rust crate. Changes here are in python/CHANGELOG.md; the crate's are in CHANGELOG.md.

Install

uv pip install manifolds-rs

Wheels are built for Linux x86_64 and macOS on both architectures, against Python 3.10 and up.

Thirty seconds

import manifolds_rs as mf

X, labels = mf.datasets.clustered(20_000, dim=50, n_clusters=12)

embedding = mf.UMAP(n_neighbors=15, min_dist=0.1).fit_transform(X)

Every estimator takes its parameters in the constructor, its data in fit, and hands back an (n_samples, n_components) array. get_params and set_params are there, so clone and Pipeline work without scikit-learn being an install requirement.

What's here

Class What it is for
UMAP The default choice. Local structure, decent global structure from the spectral init.
DensMAP UMAP with relative density preserved, so a dense region stays dense.
TSNE Local structure above all else. Barnes-Hut, 2-D only.
DensNE t-SNE with the same density correction.
PHATE Continuous structure. Trajectories and branch points survive this.
PaCMAP Global structure without leaning on a spectral init. Three pair types.
DiffusionMaps The spectral embedding PHATE is built on.
ForceAtlas2 Gephi's force-directed layout on the kNN graph, as in scanpy's draw_graph. 2-D only.
UMAPGpu, DensMAPGpu, TSNEGpu The same, with the neighbour search on the device.

Parameters

The knobs people actually turn are ordinary constructor arguments. The rest live in frozen dataclasses, one per group, and anything you leave alone keeps the crate's default:

mf.UMAP(
    n_neighbors=30,
    ann="hnsw",
    nn_params=mf.NeighbourParams(m=32, ef_search=200),
    optim_params=mf.UmapOptim(gamma=1.5, neg_sample_rate=10),
)

Every parameter has exactly one home. If it is a constructor argument it is not in the group, so there is never a question of which wins.

Reusing the neighbour graph

Running several embeddings over the same data? Build the graph once. On anything large the search is most of the runtime.

ind, dist = mf.knn_graph(X, k=15, ann="hnsw")

a = mf.UMAP().fit_transform(X, knn_indices=ind, knn_distances=dist)
b = mf.PaCMAP().fit_transform(X, knn_indices=ind, knn_distances=dist)

No transform

None of these projects new points, so there is no transform. That is the crate's position rather than a gap in the bindings: embedding new data means refitting on the combined set, which moves the existing coordinates too. Anyone telling you otherwise is doing something to the new points that is not the same operation the old ones went through.

Precision

float32 in, float32 throughout; float64 in, float64 throughout. Anything else is promoted to float64 rather than narrowed, so precision is never lost by accident. The GPU estimators are the exception and cast to float32, because WGSL has no float64 and the alternative is a failure inside a kernel.

What is not in the wheel

FFT-accelerated t-SNE. It needs FFTW, a system library no manylinux container carries, so approx="fft" raises unless you build the extension yourself with the fft_tsne feature. Barnes-Hut is the default and is what the wheel does.

Parametric UMAP is in the crate but not yet bound.

Metadata

Release files for manifolds-rs 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for manifolds-rs 0.1.4
File Interpreter ABI Platform
manifolds_rs-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
manifolds_rs-0.1.4-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
manifolds_rs-0.1.4-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 17.2 MB

Release files / manifolds_rs-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL manifolds_rs-0.1.4-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
6b963378546989f429f6d18967aef4a8a358bbb1d2e27d5f41c404e90785666c
BLAKE2b-256 checksum
How to use checksums
d587d9d50e3e981ad96b970b0c48dd3641dcb72b05de15310f788201f5f63306
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / manifolds_rs-0.1.4-cp310-abi3-macosx_11_0_arm64.whl

Download URL manifolds_rs-0.1.4-cp310-abi3-macosx_11_0_arm64.whl
Size 5.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
99c1dc9e580a512822ec415c78abeae67e7b80e7b942c9b3cf87b20832865335
BLAKE2b-256 checksum
How to use checksums
1c6e6cb4a5b1444f086c5fb2573de5170a1645ce47d0fced4f718267a68ec99b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release files / manifolds_rs-0.1.4-cp310-abi3-macosx_10_12_x86_64.whl

Download URL manifolds_rs-0.1.4-cp310-abi3-macosx_10_12_x86_64.whl
Size 5.8 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
b3526e9ef205349769e666b6afee565bfe3753f8ec22cd1f2ed9484e0e2292c4
BLAKE2b-256 checksum
How to use checksums
cace063189cddc493de5da0a7e14b0e7e0d680b4f94683de65b696bc3b3e5a90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

3 release files

0.3.2

3 release files

0.3.1

3 release files

0.3.0

3 release files

0.2.1

3 release files

0.2.0

3 release files

This release

0.1.4 This release

3 release files

0.1.3

3 release files

0.1.2

3 release files

0.1.1

3 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page