Releases: afloresep/tmap2
v0.2.0
Search binary Jaccard backend
The biggest change in 0.2.0: binary fingerprint search now uses USearch instead of FAISS. Pass binary 0/1 vectors with metric='jaccard' and USearch handles the kNN via HNSW, no FAISS dependency needed which was causing problems when installing with pip on Mac devices. Auto mode still uses exact search for small datasets and HNSW for large ones.
Single-cell utilities
New helpers for working with AnnData objects:
- subset_anndata() — subset observations in one step (works with backed objects)
- sample_obs_indices() — stratified sampling with proportional or balanced mode
- obs_to_numeric() — best-effort numeric conversion for observation columns
New examples
Added examples for image classification (CUB-200 birds, flowers, EMNIST), word embeddings (GloVe 50k), WikiArt paintings, and NLP (newsgroups). Existing examples rewritten to use the current API.
Other changes
- Renamed package TMAP → tmap2
- Development status promoted to Beta
- Added chemistry and singlecell optional dependency groups (pip install tmap2[chemistry], etc.)
- Python ≥ 3.11 (USearch has no 3.10 Linux wheels)
- New notebook: USearch binary Jaccard walkthrough
- Updated docs, notebooks, and API reference
v0.1.0a1 — First PyPI release
First public release of TMAP2 on PyPI.
pip install tmap2What's included
- sklearn-style API:
TMAP.fit,fit_transform,transform,add_points - Multiple metrics:
jaccard,cosine,euclidean,precomputed - OGDF tree layout via bundled C++ extension (prebuilt wheels for Linux x86_64 and macOS ARM)
- Three visualization backends: interactive HTML, jupyter-scatter, matplotlib
- Domain utilities: chemistry (RDKit), proteins (UniProt/AlphaFold/PDB), single-cell (AnnData)
- Model persistence:
save()/load() - Deterministic: same input + seed = same output
Quick start
from tmap import TMAP
model = TMAP(metric="jaccard", n_neighbors=20, seed=42).fit(X)
model.to_html("map.html")Requirements
- Python 3.11+
- Prebuilt wheels available for Linux (x86_64) and macOS (ARM64)
- Other platforms: installs from source (requires C++ compiler)
Based on the original TMAP by Daniel Probst and Jean-Louis Reymond.