Skip to content

Update kdtree and fix KDE radius - #444

Open
day01 wants to merge 1 commit into
statrs-dev:mainfrom
day01:feat/kdtree-0-8
Open

Update kdtree and fix KDE radius#444
day01 wants to merge 1 commit into
statrs-dev:mainfrom
day01:feat/kdtree-0-8

Conversation

@day01

@day01 day01 commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Motivation

kdtree 0.8.1 intentionally changed within() to return unordered results in mrhooray/kdtree-rs#85. The existing KDE and KNN implementations used the last result as the neighborhood radius, which produces incorrect densities after the dependency update.

Changes

  • update kdtree from 0.7.0 to 0.8.1
  • compute the neighborhood radius from the farthest returned distance instead of relying on result order
  • add a regression test with deliberately unordered distances
  • update the MSRV lockfile

Refs:
#428

@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.07%. Comparing base (92819b6) to head (edff6a8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #444   +/-   ##
=======================================
  Coverage   95.07%   95.07%           
=======================================
  Files          62       62           
  Lines       14191    14191           
=======================================
  Hits        13492    13492           
  Misses        699      699           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@day01
day01 marked this pull request as ready for review August 12, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant