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.1.tar.gz (37.9 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.1-cp314-cp314t-win_amd64.whl (213.1 kB view details)

Uploaded CPython 3.14tWindows x86-64

kdtree_rs-0.3.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (385.7 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ x86-64

kdtree_rs-0.3.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (377.8 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ ARM64

kdtree_rs-0.3.1-cp314-cp314t-macosx_11_0_arm64.whl (331.1 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

kdtree_rs-0.3.1-cp314-cp314t-macosx_10_12_x86_64.whl (337.2 kB view details)

Uploaded CPython 3.14tmacOS 10.12+ x86-64

kdtree_rs-0.3.1-cp313-cp313t-win_amd64.whl (213.0 kB view details)

Uploaded CPython 3.13tWindows x86-64

kdtree_rs-0.3.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (386.0 kB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

kdtree_rs-0.3.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (377.9 kB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARM64

kdtree_rs-0.3.1-cp313-cp313t-macosx_11_0_arm64.whl (331.0 kB view details)

Uploaded CPython 3.13tmacOS 11.0+ ARM64

kdtree_rs-0.3.1-cp313-cp313t-macosx_10_12_x86_64.whl (336.9 kB view details)

Uploaded CPython 3.13tmacOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: kdtree_rs-0.3.1.tar.gz
  • Upload date:
  • Size: 37.9 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.1.tar.gz
Algorithm Hash digest
SHA256 d77f7cc3a2bb490032ce610d3b9a9680ce1bc4de0cb9d6976be1db26025f7d55
MD5 75dc0e8ccb12a3e07b801e3fd332a4da
BLAKE2b-256 6e4abd796d0a82c33d21e21caed110e34996b985aa5bed29e7083b944b13bc5e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.3.1-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 213.1 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.1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 69dc2decb151e38388df4a1a4e43620ee87137f8a08dcc816ed95c25274c25c2
MD5 f88bb86f8c12a6f41b39735f20184fbd
BLAKE2b-256 4af77e81cd13bcb4e66fe6327aac6b64b944ea88891d3e42593ee5b23d383fc5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.3.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 385.7 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.1-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 663f32f41748aec2b71efb35075cb92b1f0998290a6c7eae3a02c73bc1e53cff
MD5 4c0be147c85a13ab6d4e41728746cfe2
BLAKE2b-256 7b49fde1720c2154e23af46600c3722ca95c854b9aaa88892c5527942b1dcd8b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.3.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 377.8 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.1-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 f0b611ee195119a382adb58531af4767035ea2414de9d3dbf4d1d4c54768f624
MD5 e6c03f5cce73db22a5ddb5675d95667a
BLAKE2b-256 1b5c7631caf47d90add8ac4e458b53904977e6982a9470020c4da818afd370ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.3.1-cp314-cp314t-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 331.1 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.1-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8bbcfa6b4bd14a1282f6b089384c96c62d273eabbabee630ea9a3f3caf9c49cc
MD5 181b89606fb7d017af8ae8872e453764
BLAKE2b-256 8cfa34b4fe5bf9f66dcf20a600b93ad97fceb5ff69392cb73557ff3ec8b59c3b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.3.1-cp314-cp314t-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 337.2 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.1-cp314-cp314t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 91b51be02df41e5ba4176dd5b66b135bdb92b8a2568d63e3497dd1d18d9e52a0
MD5 d699dba72f0aa23b3e33c73851eed444
BLAKE2b-256 277920afeb7df3363e04b78eb8877a2efd2bb773a9081238ed30423e03fdf8fb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.3.1-cp313-cp313t-win_amd64.whl
  • Upload date:
  • Size: 213.0 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.1-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 0ee111e0678bddf6672b6466c1905ae1a1c222ceff4d0edfbf295db6ff307635
MD5 076f6d604452ee0978db4e4c63690164
BLAKE2b-256 49ccbbfdf9af181e60fb15429e99e1620f4d8dd0c213d8ab3d9ec3c36b8ec2ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.3.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 386.0 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.1-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8e0a176c16309fe03a69c27b33581fb930857fe94878e4e835b03a3527629822
MD5 64d4a32204953290c95564617f69fa40
BLAKE2b-256 52364a1302949f9c65c9f12dc149c96140b5ac39fde6e07a3b859ee0be4e9980

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.3.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 377.9 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.1-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b0e0d64037fb9fdcd45fe707b01f74649705e49d29bfdd6e041c3aca4a20f7dc
MD5 d6805b1ee43ffc4dd48394f9aa7a346d
BLAKE2b-256 51c4424b64a5f8f2b77df7ebdf83383b5db0d167d9b59335c48e6687937d5ae3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.3.1-cp313-cp313t-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 331.0 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.1-cp313-cp313t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 82cb43d650996e5ea5ca7d93b46e80615bf3bb9038b69de6aa094b6dd67943a3
MD5 6f79a9d9e42e5a2691be83c4e6721ccc
BLAKE2b-256 7bd9dfdd4015b0e892352e17dbdc13623facc485c1d54516cbcefc0d89a97614

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.3.1-cp313-cp313t-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 336.9 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.1-cp313-cp313t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 500d360f9e972aa3bce0d0753a0d2b543edd7bb4078e86dfdeb221a87621c4e2
MD5 f035102e22d9d48129e59f17e5d5bc95
BLAKE2b-256 72436daf52007da6dd98e20b5a50abf5e5cd214bbb2ce59d62075ee7b8d730e9

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