Skip to content

Tessero\Spatial\KDTree

← All classes

AI assistant

Build this with Claude Code, Cursor or Copilot

Copy a Tessero-tuned prompt for Tessero\Spatial\KDTree, grounded in 2 real API signatures , into your IDE's AI. No chatbot, just exact context.

__construct
__construct(array $data)
count
count(): int

The number of points in the tree.

query
query(array $x, int $k = 1): array

The k nearest neighbours of each query point: [distances, indices]. For k == 1 each is a flat list (one value per query point); for k > 1 each is a list of k-length rows, as scipy.spatial.cKDTree.query returns.