Reductions#

Reductions behave differently than mathematical functions in the sense that they always return an IArray container, that is, the evaluation is done immediately and not in a lazy way as in mathematical functions. This is why the functions and methods involving reductions do return an IArray container and not a Lazy iarray.Expr.

all

Tests whether all input array elements evaluate to True along a specified axis.

any

Tests whether any input array element evaluates to True along a specified axis.

max

Return the maximum of an array or maximum along an axis.

min

Return the minimum of an array or minimum along an axis.

sum

Return the sum of array elements over a given axis.

prod

Return the product of array elements over a given axis.

mean

Compute the arithmetic mean along the specified axis.

var

Compute the variance along the specified axis.

std

Returns the standard deviation, a measure of the spread of a distribution, of the array elements.

median

Compute the median along the specified axis.

nanmax

Return the maximum of an array or maximum along an axis ignoring NaNs.

nanmin

Return the minimum of an array or minimum along an axis ignoring NaNs.

nansum

Return the sum of array elements over a given axis ignoring NaNs.

nanprod

Return the product of array elements over a given axis ignoring NaNs.

nanmean

Compute the arithmetic mean along the specified axis ignoring NaNs.

nanvar

Compute the variance along the specified axis ignoring NaNs.

nanstd

Returns the standard deviation ignoring NaNs.

nanmedian

Compute the median ignoring NaNs along the specified axis.