Skip to main content

Python bindings for rust_umap

Project description

umap-rs

Python bindings for rust_umap built with PyO3 + maturin.

Version 0.3.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(umap_rs.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 umap_rs 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

umap_rs-0.3.0.tar.gz (120.3 kB view details)

Uploaded Source

Built Distributions

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

umap_rs-0.3.0-cp313-cp313-win_amd64.whl (369.2 kB view details)

Uploaded CPython 3.13Windows x86-64

umap_rs-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (530.4 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

umap_rs-0.3.0-cp313-cp313-macosx_11_0_arm64.whl (460.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

umap_rs-0.3.0-cp312-cp312-win_amd64.whl (369.8 kB view details)

Uploaded CPython 3.12Windows x86-64

umap_rs-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (531.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

umap_rs-0.3.0-cp312-cp312-macosx_11_0_arm64.whl (461.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

umap_rs-0.3.0-cp311-cp311-win_amd64.whl (369.5 kB view details)

Uploaded CPython 3.11Windows x86-64

umap_rs-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (530.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

umap_rs-0.3.0-cp311-cp311-macosx_11_0_arm64.whl (460.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

umap_rs-0.3.0-cp310-cp310-win_amd64.whl (369.4 kB view details)

Uploaded CPython 3.10Windows x86-64

umap_rs-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (530.1 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

umap_rs-0.3.0-cp310-cp310-macosx_11_0_arm64.whl (460.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

umap_rs-0.3.0-cp39-cp39-win_amd64.whl (369.7 kB view details)

Uploaded CPython 3.9Windows x86-64

umap_rs-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (530.6 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

umap_rs-0.3.0-cp39-cp39-macosx_11_0_arm64.whl (461.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

File details

Details for the file umap_rs-0.3.0.tar.gz.

File metadata

  • Download URL: umap_rs-0.3.0.tar.gz
  • Upload date:
  • Size: 120.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for umap_rs-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c8f184a9eab9cdc10ef8ff109ef96badaa9e48ce4cf7c22d1b0b11f4cc2de9cd
MD5 dfdb7dcee7e828e349e5234b1e0e2671
BLAKE2b-256 6f39378d7ce491872aae7101336b5305723e86003b4ce63a9970cf140ff5b8c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0.tar.gz:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: umap_rs-0.3.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 369.2 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for umap_rs-0.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4ca7b83d8d2a50585f1fd158b238cd75f1ba50fd55b913f63204694a1c7be054
MD5 1b4aa25299e609efe1db73271ddfc4b4
BLAKE2b-256 1959596801afad1ee35a0cffe39d1039d0838ed3fc0fad8168be78b94262186b

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp313-cp313-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umap_rs-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ba185148fb2c060aaf02246d1535ead25d44b57dc79ee5f547904125815a4469
MD5 649f1287ec34691c0ac773f4c35d8bac
BLAKE2b-256 b2fc407715f0e882b1c0c9f1680f846218aba70f6e4b224a6210a172b18c379c

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umap_rs-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 69801a20b6f6498171f3429f202f83888dc4983c56f3cd78a21eb29134ba57d6
MD5 d9ecaa4d21f324f23a41804f900922f6
BLAKE2b-256 bc534d0c23cbc6c6ba1cf9be31d97a3173900da6cca92e1cdfa4f8374eea29bf

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: umap_rs-0.3.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 369.8 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for umap_rs-0.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8ef27e1c6082c14cf4ac6c2e38b59047e2293842a2e80198a4edcbc7711b5d26
MD5 896f38ee74d8ada6fa678674a927cdfc
BLAKE2b-256 a200a7d203f917ef501c019f746823735c38f07553cc5033aded999fbaa1d042

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp312-cp312-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umap_rs-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 795924944dac30f31dc1e9d6d5e7061dc6105a4663c5f8bc7dca3572794a525a
MD5 0e2db803c80f3d380949c561424a3b89
BLAKE2b-256 744963bea3f2f5dcef30425d39beb34bcf006e6430e9a4347b34330b5eb16490

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umap_rs-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f6c561f510c163f82a615a4a181f51e71b7f72d88c0e976acd3e6ab452e274ab
MD5 699031c5e27c131a52ba5da16368c415
BLAKE2b-256 9edc546729297630b83c8c703d5c54b58a97aa6d4b5d0bcb45eac6d07a2fec49

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: umap_rs-0.3.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 369.5 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for umap_rs-0.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 a17bd2a9a504af7c3a5b88ff8a091dff61e278cdbae07975600b60d5e8ab8893
MD5 da2a7b6c3d1138ad1b303fe4b399a57f
BLAKE2b-256 330a5cf8f0ed0e9153df78a9015311144666a13df66cd3d42819ad00880e4897

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp311-cp311-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umap_rs-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5839a3a593e92aea7dded954fa2b2d85e2a8dea16568e1112152eaf6089dbfdc
MD5 d7b2ea81c67ffcc5191da99a40ee8dd2
BLAKE2b-256 597af7953da08f96a4ae7de4b77713a539371ec5274c00e5101496aa7f99cb5e

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umap_rs-0.3.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3732d86ce6a35c5df602067a20d5cbfd8ab1644bf0bfa7f1709cd9c0bf602d90
MD5 d3ca79aafa3090c6fca701939199b382
BLAKE2b-256 4a6415eac73a6a3418d94853a32f5787abe80572d4ee0beea7a3b290336fd6f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: umap_rs-0.3.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 369.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for umap_rs-0.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d5c4b8180476a515538923451409328e6c109b2d92a491cebe0d5574c6e58b4c
MD5 3782eb790fc37f7ad4120ba4f89529b9
BLAKE2b-256 e2d3f482bad5cd410418c195ad8e931541254a1613130056df25a1760a00e1d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp310-cp310-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umap_rs-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c98065ebbe8faa1bb581fc1217b1b31e4f94346d45d6abdc96ed463de2a90b64
MD5 df62233a2a511a067939523910c148af
BLAKE2b-256 23d68e9a9ebf35072f96938e55331c0eb08855323d8bdf8709e00d7243667162

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umap_rs-0.3.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ff84d1ca6e6b1329b09f4d438d90dcd67e781ac535884ed24a9e81a7975dee22
MD5 1ed1e0f0583ea759ccf9f0b297c72719
BLAKE2b-256 446b60deafca1157f79d631aed20c30a34ac47cebce4d78672bf34d6c420c7a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: umap_rs-0.3.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 369.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for umap_rs-0.3.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 61e00a40bf2d1ba2d996f63c9a31f341ef167ccd20880bb90f1425a9d412c66b
MD5 3dff5c0ddaee0a15bbfd81592ea47553
BLAKE2b-256 afedc0001a47c15a7e9082706eb280a3ca19a26820d69268504d735e9ae66781

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp39-cp39-win_amd64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for umap_rs-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d34f6ae40b38d5e99587c2c1e71b0533ab424b568864461ce75c953e43b255fd
MD5 9f657a3c19fc5edb1af5829750d206e0
BLAKE2b-256 4b0cb3a1ce3fe2253b8210576b2fd1b5795179874cd3953b760356a3b31aa63e

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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

File details

Details for the file umap_rs-0.3.0-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for umap_rs-0.3.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 81cb2b02337c4261475dd15434a0e55214e79cea61b88515df9d19b71a92cf21
MD5 0bbc5be2dcc71f0a491ba18051237b24
BLAKE2b-256 37fc6ae973a8621d3e7d1f87981464c28c49c0d3a57670a5a1a15f2291cc18d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for umap_rs-0.3.0-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: python-release.yml on wenjiudaijiugui/umap-rs

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