bundles / scipy latest / scipy / ndimage / _measurements / _stats
function
scipy.ndimage._measurements:_stats
Signature
def _stats ( input , labels = None , index = None , centered = False ) Summary
Count, sum, and optionally compute (sum - centre)^2 of input by label
Parameters
input: array_like, N-DThe input data to be analyzed.
labels: array_like (N-D), optionalThe labels of the data in
input. This array must be broadcast compatible withinput; typically, it is the same shape asinput. Iflabelsis None, all nonzero values ininputare treated as the single labeled group.index: label or sequence of labels, optionalThese are the labels of the groups for which the stats are computed. If
indexis None, the stats are computed for the single group wherelabelsis greater than 0.centered: bool, optionalIf True, the centered sum of squares for each labeled group is also returned. Default is False.
Returns
counts: int or ndarray of intsThe number of elements in each labeled group.
sums: scalar or ndarray of scalarsThe sums of the values in each labeled group.
sums_c: scalar or ndarray of scalars, optionalThe sums of mean-centered squares of the values in each labeled group. This is only returned if
centeredis True.
Aliases
-
scipy.ndimage._measurements._stats