This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / spatial / _ckdtree / cKDTree / _build_weights

cython_function_or_method

scipy.spatial._ckdtree:cKDTree._build_weights

Signature

def _build_weights(weights)

Summary

Compute weights of nodes from weights of data points. This will sum up the total weight per node. This function is used internally.

Parameters

weights : array_like

weights of data points; must be the same length as the data points. currently only scalar weights are supported. Therefore the weights array must be 1 dimensional.

Returns

node_weights : array_like

total weight for each KD-Tree node.

Aliases

  • scipy.spatial.cKDTree._build_weights