Skip to main content

Python bindings for rust_umap

Project description

umapers

Python package umapers, backed by rust_umap and built with PyO3 + maturin.

Version 1.0.0 focuses on IDE-help quality for the public Python API:

  • the exported surface has useful type hints
  • public methods carry docstrings that explain inputs and outputs
  • help(umapers.Umap) and editor hover should be informative

The binding remains intentionally thin: Python normalizes arrays and CSR inputs, while Rust owns validation and compute-heavy paths whenever practical.

Local build

PYTHON_BIN="$(command -v python3 || command -v python)"
uv venv --python "$PYTHON_BIN" .venv
uv pip install --python .venv/bin/python --upgrade pip maturin
uv run --python .venv/bin/python maturin develop --manifest-path umap_rs/Cargo.toml
uv run --python .venv/bin/python python -I -m pytest -q umap_rs/tests/test_binding.py

Quick usage

import numpy as np
from umapers import Umap

x = np.random.default_rng(42).normal(size=(200, 16)).astype(np.float32)
model = Umap(n_neighbors=15, n_components=2, n_epochs=120, random_seed=42, init="random")
emb = model.fit_transform(x)

API layers

Main API

Most users should start here:

  • Umap
  • fit_transform
  • Umap.fit
  • Umap.fit_transform
  • Umap.transform
  • Umap.inverse_transform

These methods accept NumPy arrays by default and support the documented out= buffers where available.

Advanced API

Umap.fit_transform_with_knn(...) is available for callers who already have a precomputed exact or shared kNN graph. It is useful for benchmarks and parameter sweeps, but it is not the recommended first-stop quickstart.

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.0.0.tar.gz (122.9 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.0.0-cp313-cp313-win_amd64.whl (540.0 kB view details)

Uploaded CPython 3.13Windows x86-64

umapers-1.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (676.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

umapers-1.0.0-cp313-cp313-macosx_11_0_arm64.whl (592.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

umapers-1.0.0-cp312-cp312-win_amd64.whl (540.6 kB view details)

Uploaded CPython 3.12Windows x86-64

umapers-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (677.5 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

umapers-1.0.0-cp312-cp312-macosx_11_0_arm64.whl (592.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

umapers-1.0.0-cp311-cp311-win_amd64.whl (540.3 kB view details)

Uploaded CPython 3.11Windows x86-64

umapers-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (676.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

umapers-1.0.0-cp311-cp311-macosx_11_0_arm64.whl (592.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

umapers-1.0.0-cp310-cp310-win_amd64.whl (540.1 kB view details)

Uploaded CPython 3.10Windows x86-64

umapers-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (676.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

umapers-1.0.0-cp310-cp310-macosx_11_0_arm64.whl (592.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

umapers-1.0.0-cp39-cp39-win_amd64.whl (540.7 kB view details)

Uploaded CPython 3.9Windows x86-64

umapers-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (677.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

umapers-1.0.0-cp39-cp39-macosx_11_0_arm64.whl (593.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for umapers-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ca3faca49cea9ace4b3ad26bbe645edc25067290a2ea1f95504ab54885caf79e
MD5 f5b5f9346e3c7c98aa5c9f8a755274de
BLAKE2b-256 27404ccf3cc1cae51d6e8db186f3f883ab070bf5fc4e2def89a0b3987b42001d

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0.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.0.0-cp313-cp313-win_amd64.whl.

File metadata

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

File hashes

Hashes for umapers-1.0.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 cc91671c22e27125db224c8464437beb1e92fd8f4d11535d19ec59ac16670cba
MD5 756439ab32c130458b8ad24613f9eac6
BLAKE2b-256 059a610f59c68b99d572fb6169f3249c254cf59c5eed0dc23101b0d7ec6a5977

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.0.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fa2bcac709246fc85d3dcdd4c913471bdabddec7914361c016c33bd58cd0aa30
MD5 11b896d07d5c1064e093f75b7c0b6d26
BLAKE2b-256 43833eb41ccceb34ff2dbc1752f2e814f46b7030f12dc846afacf2e691d5ca79

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.0.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d9b7e89565f01af7ec6013629f619fa248382f4a422381ee342110632f478a83
MD5 f5a114ccea236c007b8cb8650cdd59a0
BLAKE2b-256 686af8c1b6a5c9a23e386a3ad7ddba6f83344469e38520567cbb32334a048e35

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp312-cp312-win_amd64.whl.

File metadata

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

File hashes

Hashes for umapers-1.0.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 ce33e8d682fa1173629305474f82421607d3330cc301c5b3e72b58f4cf53be17
MD5 10eb6515062d35210f8081ec81cd3928
BLAKE2b-256 5c148f730990083f18bb52e3f61c9f7f59834141be2930ef953695893b735bd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.0.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9fc835abec71d88281662a6525e96f03786c2a0f7249ce34295ea2d304f72d31
MD5 e2f041311382a14c220c90a1210b4d16
BLAKE2b-256 7be4267a1d644c96f4ab0e46a1b0ad96078c8e8de6a4b11288572ecd3d79b6c9

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.0.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0bf8de3010dacec2f99a7dc079c4fa354d8418c50206d151cc44c10de52a3004
MD5 48e37930cada796763c1ef944a03c9a1
BLAKE2b-256 1fc54f97015220adae95dcf796f91b46de1ff5c0d9dcad6ec030562aef1f14c5

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp311-cp311-win_amd64.whl.

File metadata

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

File hashes

Hashes for umapers-1.0.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 618940e909a91f22bb963f832e99b75b5a9595a040cf34336e9ac96612cf7664
MD5 1e45ca446ca848290fc28a994be5abe9
BLAKE2b-256 7b1917f5b89a48260b3c08290d94bf9e3084e6822c2a4e4ed6dedbebf266ec2d

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.0.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2eb5f89dbd7ce9ccb1c672b1899df533b7a8287b73a0b097ee4d9cb06947469e
MD5 c5bbdf40113edca6af7fa139332272fd
BLAKE2b-256 1ca594b6664356dfa5f060dccc188fd5f1d31350a4eaa159a04c91fe88cad4e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.0.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a098ac1aa8ad4e7fe626f149606034b8bd5dd0c8815456f26cdcba248ccd8013
MD5 876041ff3769742c6d679287f8a723b9
BLAKE2b-256 58f5ca3a196b24c172bddf18c5c19602ad4a0060cb7b1d369a6cae81e28d8f2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp310-cp310-win_amd64.whl.

File metadata

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

File hashes

Hashes for umapers-1.0.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 21ae7b7d4a7232e62521c8f2cf0dd49790ef350c9fff5255c7cda2a8e597668a
MD5 9e3a331a73c89a21dafd8d073b2a8306
BLAKE2b-256 f1c984b5cf087a944c67e8d4182d59a9778d77b5400640c8f047c304ce131c31

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.0.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 981cbc6acc336a7ad5932b5794824e176a8cc6be70d11f838b90a522636c5de2
MD5 e77868e18dff6d720af2f0d46b37adcd
BLAKE2b-256 50c7770c3d5b9c34677c1e79ec95bdf55a66ffe7fc3cf3fdbd6ac86b5a5cb65c

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.0.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ad043a8c034b15cdc2c5143ad2a488637c08cd2dd8965c29d77157caa417d5d2
MD5 82129f950e269831a217ea99c5a85adc
BLAKE2b-256 d5e2e6906dd2f4d1f9e05852abc8a1491eb4d320b0f4743ae68287d0e14f6820

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp39-cp39-win_amd64.whl.

File metadata

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

File hashes

Hashes for umapers-1.0.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 23d57bcdef75121fa23947b271ab149409e457dc414694417cd0af215a80fef8
MD5 37560371eddb9d7f0edf2695d87eb23b
BLAKE2b-256 7a8941f56e9cb17a013a2829639c2cd6eabdc216c14a11637011d741f4b30802

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umapers-1.0.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 61d895bfd0efdc453d6c8bc1e9ecaf95e552930f74e8e1d949c7d603c59d7ea5
MD5 219f982276156fade6401bc1a76263d1
BLAKE2b-256 86b6c81dfbcd3f209b44120342e1f7242445679e103a563a8ac952685d7527f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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.0.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umapers-1.0.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a31089555514d0e0f6628dbeb8bcadd380e5131810a5b5266ff90437835d53f6
MD5 0a16e19819e0786a8ea4ef860f417ffc
BLAKE2b-256 17cc469048848ea3cb551f9eebee5118c1a88cbbe6fe57f7236270c6b2959bdc

See more details on using hashes here.

Provenance

The following attestation bundles were made for umapers-1.0.0-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