bundles / numpy 2.4.3 / numpy / lib / _arraypad_impl / _get_stats
function
numpy.lib._arraypad_impl:_get_stats
Signature
def _get_stats ( padded , axis , width_pair , length_pair , stat_func ) Summary
Calculate statistic for the empty-padded array in given dimension.
Parameters
padded: ndarrayEmpty-padded array.
axis: intDimension in which the statistic is calculated.
width_pair: (int, int)Pair of widths that mark the pad area on both sides in the given dimension.
length_pair: 2-element sequence of None or intGives the number of values in valid area from each side that is taken into account when calculating the statistic. If None the entire valid area in
paddedis considered.stat_func: functionFunction to compute statistic. The expected signature is
stat_func(x: ndarray, axis: int, keepdims: bool) -> ndarray.
Returns
left_stat, right_stat: ndarrayCalculated statistic for both sides of
padded.
Aliases
-
numpy.lib._arraypad_impl._get_stats