Reduction Functions#

Contrarily to lazy functions, reduction functions are evaluated eagerly, and the result is always a NumPy array (although this can be converted internally into an NDArray if you pass any blosc2.empty() arguments in kwargs).

Reduction operations can be used with any of NDArray, C2Array, NDField and LazyExpr. Again, although these can be part of a LazyExpr, you must be aware that they are not lazy, but will be evaluated eagerly during the construction of a LazyExpr instance (this might change in the future).

all

Test whether all array elements along a given axis evaluate to True.

any

Test whether any array element along a given axis evaluates to True.

sum

Return the sum of array elements over a given axis.

prod

Return the product of array elements over a given axis.

mean

Return the arithmetic mean along the specified axis.

std

Return the standard deviation along the specified axis.

var

Return the variance along the specified axis.

min

Return the minimum along a given axis.

max

Return the maximum along a given axis.