{ } Raw JSON

bundles / scipy 1.17.1 / scipy / spatial / _ckdtree / cKDTreeNode

class

scipy.spatial._ckdtree:cKDTreeNode

source: /scipy/spatial/_ckdtree.cpython-314-x86_64-linux-gnu.so

Members

Summary

class cKDTreeNode

Extended Summary

This class exposes a Python view of a node in the cKDTree object.

All attributes are read-only.

Attributes

level : int

The depth of the node. 0 is the level of the root node.

split_dim : int

The dimension along which this node is split. If this value is -1 the node is a leafnode in the kd-tree. Leafnodes are not split further and scanned by brute force.

split : float

The value used to separate split this node. Points with value >= split in the split_dim dimension are sorted to the 'greater' subnode whereas those with value < split are sorted to the 'lesser' subnode.

children : int

The number of data points sorted to this node.

data_points : ndarray of float64

An array with the data points sorted to this node.

indices : ndarray of intp

An array with the indices of the data points sorted to this node. The indices refer to the position in the data set used to construct the kd-tree.

lesser : cKDTreeNode or None

Subnode with the 'lesser' data points. This attribute is None for leafnodes.

greater : cKDTreeNode or None

Subnode with the 'greater' data points. This attribute is None for leafnodes.

Aliases

  • scipy.spatial._ckdtree.cKDTreeNode