Skip to main content

A minimal, high-performance KDTree for free-threaded CPython

Project description

kdtree-rs

A minimal, high-performance KDTree for free-threaded CPython.

Install

pip install kdtree-rs
# or
uv add kdtree-rs

Requires Python 3.13+ with free-threaded build (cp313t / cp314t).

Usage

The PyPI distribution kdtree-rs is imported as kdtree:

import numpy as np

from kdtree import KDTree

data = np.array([[0.0, 0.0], [1.0, 0.0], [3.0, 0.0]])
tree = KDTree(data, leafsize=32)

distances, indices = tree.query(np.array([[0.2, 0.0], [2.8, 0.0]]), k=2)

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

kdtree_rs-0.3.0.tar.gz (37.5 kB view details)

Uploaded Source

Built Distributions

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

kdtree_rs-0.3.0-cp314-cp314t-win_amd64.whl (214.2 kB view details)

Uploaded CPython 3.14tWindows x86-64

kdtree_rs-0.3.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (387.2 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ x86-64

kdtree_rs-0.3.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (379.1 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ ARM64

kdtree_rs-0.3.0-cp314-cp314t-macosx_11_0_arm64.whl (332.3 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

kdtree_rs-0.3.0-cp314-cp314t-macosx_10_12_x86_64.whl (338.7 kB view details)

Uploaded CPython 3.14tmacOS 10.12+ x86-64

kdtree_rs-0.3.0-cp313-cp313t-win_amd64.whl (214.3 kB view details)

Uploaded CPython 3.13tWindows x86-64

kdtree_rs-0.3.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (387.1 kB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

kdtree_rs-0.3.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (378.8 kB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARM64

kdtree_rs-0.3.0-cp313-cp313t-macosx_11_0_arm64.whl (332.4 kB view details)

Uploaded CPython 3.13tmacOS 11.0+ ARM64

kdtree_rs-0.3.0-cp313-cp313t-macosx_10_12_x86_64.whl (338.5 kB view details)

Uploaded CPython 3.13tmacOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: kdtree_rs-0.3.0.tar.gz
  • Upload date:
  • Size: 37.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kdtree_rs-0.3.0.tar.gz
Algorithm Hash digest
SHA256 f2b5428fc0f8db58e20c1eb5602dd4bd0649e628ea74d1acdbba25963683f98d
MD5 2eece6a26ab3ace9ab65db954b36a752
BLAKE2b-256 548067b0783880bc02a961328d946afccec5c79547a8a1307663e886433844d9

See more details on using hashes here.

File details

Details for the file kdtree_rs-0.3.0-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: kdtree_rs-0.3.0-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 214.2 kB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kdtree_rs-0.3.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 cd118ab4645a1d3b14296247e3628a4dec28731b7529e9b5d63cb8ea7b850257
MD5 7b38e93f2ee72aa19391f11b1e35a792
BLAKE2b-256 f357070bcde12004860c62683d32cad1ea6b6da0b3ff9f267fff3d3a0a9c142f

See more details on using hashes here.

File details

Details for the file kdtree_rs-0.3.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: kdtree_rs-0.3.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 387.2 kB
  • Tags: CPython 3.14t, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kdtree_rs-0.3.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1a5e6071d16b1ba0d41a8cea92566ee8b93af4bd47c21c92fd4e25cc42cdea84
MD5 a4e41efd4730ebac247254f6fe9750cb
BLAKE2b-256 66c71d080a2d27095f8ae336d98a60d538f71ed886a07c2b082e57d83beebcc5

See more details on using hashes here.

File details

Details for the file kdtree_rs-0.3.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: kdtree_rs-0.3.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 379.1 kB
  • Tags: CPython 3.14t, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kdtree_rs-0.3.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2d82f17d9441891b8280940938b9aef323959346d42734e0cda13264f95a5ba6
MD5 3a29eded6b1abed8f34121becd0d81cf
BLAKE2b-256 7245945a9d5cc5a084864e66a1525f9d420ee3b687017fc152ad9a9a30dc6687

See more details on using hashes here.

File details

Details for the file kdtree_rs-0.3.0-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

  • Download URL: kdtree_rs-0.3.0-cp314-cp314t-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 332.3 kB
  • Tags: CPython 3.14t, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kdtree_rs-0.3.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d94be6e86647ce4c24f311b2c52a0c0e903f2fad97a9935774721bca2af168b3
MD5 2cd14d44e12156fb85be9553c378e16b
BLAKE2b-256 6fc5b4ccf27e08345d254b72116ad2503a8dc2300032e223e078a9a66651adaa

See more details on using hashes here.

File details

Details for the file kdtree_rs-0.3.0-cp314-cp314t-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: kdtree_rs-0.3.0-cp314-cp314t-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 338.7 kB
  • Tags: CPython 3.14t, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kdtree_rs-0.3.0-cp314-cp314t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 47485cae4ebc6f97a1f74095a122bd815979313dcf8d62cb4dcc6532382459df
MD5 1e3e9df54d0e21a53804ed512deef045
BLAKE2b-256 50852f1856339015ca16eaec916fe8414353d20a682866322d27690c24ff9c0b

See more details on using hashes here.

File details

Details for the file kdtree_rs-0.3.0-cp313-cp313t-win_amd64.whl.

File metadata

  • Download URL: kdtree_rs-0.3.0-cp313-cp313t-win_amd64.whl
  • Upload date:
  • Size: 214.3 kB
  • Tags: CPython 3.13t, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kdtree_rs-0.3.0-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 c4f158138bf8b45ad00a2af6f876bec8290332f91b8194393408b20dfedf4858
MD5 9a27e9339111527748c404d947ec66e4
BLAKE2b-256 80e5461f4e5d06527d6869dcaaaad4fa8ddfbce817b43a050ef05f34f8890006

See more details on using hashes here.

File details

Details for the file kdtree_rs-0.3.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

  • Download URL: kdtree_rs-0.3.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 387.1 kB
  • Tags: CPython 3.13t, manylinux: glibc 2.17+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kdtree_rs-0.3.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b76ac1fa235f07bb994087f57db04cc2cf74f30d795e95519497706d510f6aa3
MD5 90bf0a19437b4c913c6ff345e593f25b
BLAKE2b-256 aee6a668a9a33693d9d6bb5cf4dd291a245e9d97529490da701fbaaaa5ed849d

See more details on using hashes here.

File details

Details for the file kdtree_rs-0.3.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

  • Download URL: kdtree_rs-0.3.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 378.8 kB
  • Tags: CPython 3.13t, manylinux: glibc 2.17+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kdtree_rs-0.3.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 062623d43baeb7e1d077ef9b6f325f50ca4a7684a31c68c512c96fb195519e0b
MD5 c3cdce91cb2730125babf010cb005013
BLAKE2b-256 66e8b1af428a90e187591048a1d16a1aba4252399e811864cfc675563df8cba8

See more details on using hashes here.

File details

Details for the file kdtree_rs-0.3.0-cp313-cp313t-macosx_11_0_arm64.whl.

File metadata

  • Download URL: kdtree_rs-0.3.0-cp313-cp313t-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 332.4 kB
  • Tags: CPython 3.13t, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kdtree_rs-0.3.0-cp313-cp313t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 85eb9e3968f71c27e408b14aa9ad439ddd2a73d91a0d52c36043a8037a0552c6
MD5 24702cbc07c70908f0b03f5ac983eaa1
BLAKE2b-256 b6d21fe0e909dc8819c47fdf8c893742d255c82478340dfb01085f728c9b8a21

See more details on using hashes here.

File details

Details for the file kdtree_rs-0.3.0-cp313-cp313t-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: kdtree_rs-0.3.0-cp313-cp313t-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 338.5 kB
  • Tags: CPython 3.13t, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for kdtree_rs-0.3.0-cp313-cp313t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 be30315fb565e137c29123a5c1e82d794f0ea658e40e96f19c55ac0d5b44e170
MD5 9e45031a37ab4e4bc7d2d25f507d09dd
BLAKE2b-256 a5e401081184b2f1e1b1092b8bbcb22cff3ccf5aed7c878c4b770d72a608be29

See more details on using hashes here.

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