Skip to main content

Python bindings for rust_umap

Project description

umapers

umapers is a Python UMAP library for dimensionality reduction, clustering workflows, and embedding visualization.

umap-learn is the established Python implementation used as the compatibility and benchmark baseline for this project. For matching parameters and workflows, umapers keeps the user-visible semantics familiar while running its own fitting and transform code instead of importing umap-learn at runtime.

The public API is intentionally small: fit an embedding, transform new rows, check quality, and reproduce runs with fixed seeds.

Installation

pip install umapers

Published wheels support CPython 3.9 through 3.13. Python 3.14 is excluded until the PyO3 binding dependency is upgraded and validated on that runtime.

Optional extras for plotting and diagnostics:

pip install "umapers[plot,diagnostics]"

Quickstart

import numpy as np
from umapers import Umap

x = np.random.default_rng(42).normal(size=(1000, 32)).astype(np.float32)

embedding = Umap(
    n_neighbors=15,
    n_components=2,
    n_epochs=200,
    random_seed=42,
).fit_transform(x)

Fit once and transform new rows:

model = Umap(random_seed=42).fit(x)
query_embedding = model.transform(x[:10])

Use labels to run categorical supervised UMAP:

labels = np.random.default_rng(7).integers(0, 4, size=x.shape[0])

embedding = Umap(
    target_metric="categorical",
    target_weight=0.5,
    random_seed=42,
).fit_transform(x, y=labels)

Results

The 1.1 release reports compare umapers with umap-learn on feature coverage, clustering quality, and runtime. On the real datasets tested here, downstream clustering quality is similar. On the synthetic scaling benchmarks, umapers is strongest on medium and large matrices; for very small datasets, fixed overhead can make umap-learn faster.

Supported Workflows

Need API
Fit a 2D or nD embedding Umap(...).fit_transform(data)
Fit once, then transform new rows model.fit(data) then model.transform(query)
Approximate inverse mapping model.inverse_transform(embedding)
Categorical supervised embedding target_metric="categorical", pass y=
Dense densMAP radii densmap=True, output_dens=True
Sparse input pass CSR/CSC/COO input to fit or fit_transform
Plot an embedding umapers.plot.points(...)
Compute trustworthiness umapers.diagnostics.trustworthiness_report(...)
Reuse a precomputed kNN graph Umap.fit_transform_with_knn(...)
Parametric convenience workflow ParametricUmap
Aligned convenience workflow AlignedUmap

Known Gaps

  • sparse-trained inverse_transform is not supported yet
  • ParametricUmap is a lightweight convenience workflow, not a Keras/TensorFlow replacement
  • AlignedUmap covers only part of the relation modes available in umap-learn
  • approximate-neighbor behavior is not identical to pynndescent
  • arbitrary precomputed graph input is not exposed as a general public API

Source Build

pip install --upgrade pip maturin
maturin develop --release --manifest-path umap_rs/Cargo.toml
python -I -m pytest -q umap_rs/tests/test_binding.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

umapers-1.1.4.tar.gz (240.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

umapers-1.1.4-cp313-cp313-win_amd64.whl (970.1 kB view details)

Uploaded CPython 3.13Windows x86-64

umapers-1.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

umapers-1.1.4-cp313-cp313-macosx_11_0_arm64.whl (926.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

umapers-1.1.4-cp312-cp312-win_amd64.whl (970.5 kB view details)

Uploaded CPython 3.12Windows x86-64

umapers-1.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

umapers-1.1.4-cp312-cp312-macosx_11_0_arm64.whl (926.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

umapers-1.1.4-cp311-cp311-win_amd64.whl (971.9 kB view details)

Uploaded CPython 3.11Windows x86-64

umapers-1.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

umapers-1.1.4-cp311-cp311-macosx_11_0_arm64.whl (927.5 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

umapers-1.1.4-cp310-cp310-win_amd64.whl (970.0 kB view details)

Uploaded CPython 3.10Windows x86-64

umapers-1.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

umapers-1.1.4-cp310-cp310-macosx_11_0_arm64.whl (927.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

umapers-1.1.4-cp39-cp39-win_amd64.whl (970.5 kB view details)

Uploaded CPython 3.9Windows x86-64

umapers-1.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

umapers-1.1.4-cp39-cp39-macosx_11_0_arm64.whl (927.8 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file umapers-1.1.4.tar.gz.

File metadata

  • Download URL: umapers-1.1.4.tar.gz
  • Upload date:
  • Size: 240.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for umapers-1.1.4.tar.gz
Algorithm Hash digest
SHA256 cc10c5d86e4584bddcc9fd472c9d0aec5a3b60aca3e45125a24064400bf3ce25
MD5 919ed688e4c1df8ba8434a240403855a
BLAKE2b-256 55ae3b3d79053c222dc24cd433060a8804e0820688a7a5461081637681e77bf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4.tar.gz:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.4-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 970.1 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for umapers-1.1.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 9c5a366674d3ace512bf5874dd820e281c52aaf1924d5fad8367ef075fa55fb9
MD5 3797bf664d0990952b4ae5e90bc652e4
BLAKE2b-256 a9b1f7a56f90bdac8066c5d53e4fe2a80beb40de0815dc60bf05931024b926ea

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp313-cp313-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 577675c43ac389d5083fdcddaa14eca945539f20c828e3560bb4e3f83d029b95
MD5 fa7758cbe91f6f74202dd5b167b27e6e
BLAKE2b-256 853b8aaf5a6868ef3f8dbbe75484ad28797c17b2cd2f978a576fb88a3cf105a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3e17eb5ef815a0804c4357696b645c4ed54afa0f4883640eadfd41e81365f556
MD5 7eadf2a57b5b4c3fed70066f2f1145d3
BLAKE2b-256 f81c352f81584fd6ce3d223d7656c708984b5c3c9297d5353b85a34fb5f4fe0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.4-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 970.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for umapers-1.1.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 fa0a866f7637cece7112130974ad40c0d5723a4f23ec506ea96dae957200237a
MD5 4d9bb93e16989177caf0727e7320d2de
BLAKE2b-256 e0d96f2c4a4c430a2d5212b0e2f217156a127c8273b831b02d3e29fc35516a70

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp312-cp312-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 05659b9a64884ef978f03b3a18788d562260e1d7095070b385d81b6d849e5735
MD5 0c0ed2e8d2d2da284843bfd74a326be8
BLAKE2b-256 e4d8497870af426cd35fcb410deaf186815ff4b7eb13815ca9ef02cfffaf59e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c61179d64740bddff475f04141a90207de1d60ec32b8b849ed18bdf999aca669
MD5 e218a090305f304e86de5e9e3880f07b
BLAKE2b-256 29f816554cbd0c44d8af2518410b07583d4c8a1c4ca648c09d72a4585b36c6eb

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.4-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 971.9 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for umapers-1.1.4-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 43e1924965819213c813cb29df3ee52f05597daa55543b3d1200e1851e4ff19b
MD5 578cca7b2962be2a6d20d79368e3c513
BLAKE2b-256 5427fd2044a7e0ea39434e8b15dfa617f78ce9ec68a68844c475c00131714d77

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp311-cp311-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3ffafad2397fc0fe9b3a4867b77bfd6f54dd0d80035382acd3081d21bd47a8c8
MD5 1d1dfe24e9078b7e4b07df2c5da0511a
BLAKE2b-256 8fea1244b45a41e25c5ba08bea1730e5b27c7b8fc6b3558f04c0d8839f6f3430

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b484ab071553dc3ec3ae3c6fa8ea004923750974e5b75057fd240e926c2c05e6
MD5 f11b1334fbc002cb334b3d584812fd9f
BLAKE2b-256 d0205e1f802877c0b4315c281b4efa15b302522d73a1c1871fe091ce5d423fb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.4-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 970.0 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for umapers-1.1.4-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 8decafdd74244637591fb1bde16781810ec3c955532462dac46e13dc042f7949
MD5 1084877e59808216ba0b8d7183eb4d8a
BLAKE2b-256 f2e08f451555adc78c588ec214a3566958f6a5057b73c4ec0931989c712a5f7d

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp310-cp310-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7dad2b6a380ae540b40d59269cab41bdea0845951b2b7cc5322c9066857f8e93
MD5 4f79aa4b883119e1569354cde892fbe0
BLAKE2b-256 8e5c66d29f673da7552f7b53e5da2082674ced3c5ce6a58a9941e9a5ac53a487

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5f47b43d3c00ac48a783a3dd21a3f81ed0ad7af87512ebc246b3572c868c2c74
MD5 9274b4091dad16391e1e9d2d39b41ff6
BLAKE2b-256 16ff443b1b2b0b07c3c3ef5188883a95b6f85ed6ed829fcb69f77727a53974a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: umapers-1.1.4-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 970.5 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for umapers-1.1.4-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 a29e7b6bc962a73a53acd3c0e22a28fbdc63208b40d925877b9452e24576b155
MD5 b18b1a2fc768e5fef0e48ed7c976a40f
BLAKE2b-256 4d235a59eaed0c569d3eb728ccc84b177d843ed90131901ae520091d27bb71a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp39-cp39-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b3683afab63c2864b2c8b35092df64f5eca85ce84d0b6c21a51176dd2523805
MD5 2284e882c7eb2e760e3aa282027b1b74
BLAKE2b-256 77d7fb7f496ec48bec4ca3b3a17063ccb521acaa49bb6b97e47ff773f3ac163f

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file umapers-1.1.4-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.1.4-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 53aeffe213b240bb93a2b8cbd1d4256fcbdc5cd0ce4006a4f42b3391fa7981cc
MD5 7bd298278adc902ce4b4b20cc7587139
BLAKE2b-256 6f3f334dacedbfec1fd9ed69af39465ca05c47a50c440e4101751214ede8444d

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.1.4-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umapers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page