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.2.0.tar.gz (37.1 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.2.0-cp314-cp314t-win_amd64.whl (213.2 kB view details)

Uploaded CPython 3.14tWindows x86-64

kdtree_rs-0.2.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (385.5 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ x86-64

kdtree_rs-0.2.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (378.0 kB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ ARM64

kdtree_rs-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl (331.2 kB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

kdtree_rs-0.2.0-cp314-cp314t-macosx_10_12_x86_64.whl (337.9 kB view details)

Uploaded CPython 3.14tmacOS 10.12+ x86-64

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

Uploaded CPython 3.13tWindows x86-64

kdtree_rs-0.2.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (385.9 kB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ x86-64

kdtree_rs-0.2.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (377.3 kB view details)

Uploaded CPython 3.13tmanylinux: glibc 2.17+ ARM64

kdtree_rs-0.2.0-cp313-cp313t-macosx_11_0_arm64.whl (331.4 kB view details)

Uploaded CPython 3.13tmacOS 11.0+ ARM64

kdtree_rs-0.2.0-cp313-cp313t-macosx_10_12_x86_64.whl (337.4 kB view details)

Uploaded CPython 3.13tmacOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: kdtree_rs-0.2.0.tar.gz
  • Upload date:
  • Size: 37.1 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.2.0.tar.gz
Algorithm Hash digest
SHA256 6e494b9bed6cc2eba4c914f14ea4c651712bd8dd44c680202a72cc6a5e010601
MD5 f3ca59d45867b4ab5a337664cae356cb
BLAKE2b-256 b9a27e390f1fcf6ead3b34334ef7ef91be4ccc774ac0fe8e1fe0d7b92530d8db

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.2.0-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 213.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.2.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 1e41190b0df4fb65c49da49915d7a4021b88625d9fbc89ab57a00203e8501d6b
MD5 7ebf94c5c01efee9b58666c56a62a642
BLAKE2b-256 148dde0a3be8ebfed8df20b5c1edf5225635f30a7a7e1306e50c74f3892f9c3f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.2.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 385.5 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.2.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e0a380a48f545f3d9ef6405879b408b0e4b727754f0b73cdc50f1d905bec5f3f
MD5 90477ad104899185b6a827f66fa5eaba
BLAKE2b-256 744348009ec236add51d27c65407dc279cfd68f4e7ce573fa786e43473d26c65

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.2.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 378.0 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.2.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ccb245c41db6491fed6de01482f5f161b671e2b2edf253a815736bbfb3b9094f
MD5 587ed80bd3390b2e5582f23d7168db7c
BLAKE2b-256 867e0e30da6eacab1d48b70b49569040b9be8665de5ae6e720ae3a1af20b195f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.2.0-cp314-cp314t-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 331.2 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.2.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a1b4cea27878daba8063a4c0216b78b86373d73fed5a26a94adf2811da50c43f
MD5 043d56a0002987464547f5f91804d62f
BLAKE2b-256 f3554e0c7a3a6b2f0df1d9b6213dc6b47dfbf73b2e16307692096070a620b4eb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.2.0-cp314-cp314t-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 337.9 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.2.0-cp314-cp314t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0a6f8217deb0066ef7a0490c4684eac8054846c4ae971ab15c472b375f969b4c
MD5 7dba10ee6c2b30314242e41ad41b2e84
BLAKE2b-256 09f613910277a0cd0fd513f6498f0471c5c73b2621a7182d1cd9e3b3ff063c1f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.2.0-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.2.0-cp313-cp313t-win_amd64.whl
Algorithm Hash digest
SHA256 4f795cc0f9963c2cac6a702e5deab3abdb649ae8fb71ba02a662cf262f516b7a
MD5 040a838704c3980184a10258623f7776
BLAKE2b-256 33385fb0df3d0a87bf9d9a0db8b8229a2856a4baa48594521c48c22c5cd01bb4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.2.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  • Upload date:
  • Size: 385.9 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.2.0-cp313-cp313t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 85ac234b1d88b8ee2bd034500f2f43edafadba3770992fd4b316cd87ec5d9a7b
MD5 5a321e4a70457e2567ad21a5331b2aa2
BLAKE2b-256 72352b47eb72377b3f4f8125ff4cc8accda85014bddd1cdf63e0da97697390e8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.2.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
  • Upload date:
  • Size: 377.3 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.2.0-cp313-cp313t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 9591548c34a7fef0ec2a71db0775b0871bb8bb6b53c5f1f1b9770cf48a61d18d
MD5 03684855746deaab840443ce70875bbd
BLAKE2b-256 0971805b7226e5c04ce69228f6849e1fa72ed330e40f341a60d6f33d0f6666ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.2.0-cp313-cp313t-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 331.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.2.0-cp313-cp313t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 51b2abab41ed6645c96ed57675c9edb1622af45ecc3ac2d53f305842d22e375e
MD5 c8d88e8369771a7df1b112fa2066e236
BLAKE2b-256 0de93cc3e70a46271a16ed73a655f8f60becd43b7b1c4599bff4786004a6bb3a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kdtree_rs-0.2.0-cp313-cp313t-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 337.4 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.2.0-cp313-cp313t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8ed8b21fc2c0fa9ceaba5b75f458d0ac343b2d5fabd3dfeca2635e093a2e9fd4
MD5 4e59d964fa7b142c2213b452e369a31c
BLAKE2b-256 968319cc4cea49d37b150244de9da19c0d29d4c554fd23db336dd98cd642f24a

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