KDTree.build

KDTree.build(objects, axis=0)[source]

Populate a kd-tree with given objects.

Parameters
  • objects (sequence[tuple[[float, float, float] | Point, int or str]]) – The tree objects as a sequence of point-label tuples.

  • axis (int, optional) – The axis along which to build.

Returns

Node or None – The root node, or None if the sequence of objects is empty.