method description sum sum of all the elements in the array or along an axis zero-length arrays have sum mean arithmetic mean zero-length arrays have nan mean stdvar standard deviation and variancerespectivelywith optional degrees of freedom adjustment (default denominator nminmax minimum and maximum argminargmax indices of minimum and maximum elementsrespectively cumsum cumulative sum of elements starting from cumprod cumulative product of elements starting from methods for boolean arrays boolean values are coerced to (trueand (falsein the above methods thussum is often used as means of counting true values in boolean arrayin [ ]arr randn( in [ ](arr sum(number of positive values out[ ] there are two additional methodsany and alluseful especially for boolean arrays any tests whether one or more values in an array is truewhile all checks if every value is truein [ ]bools np array([falsefalsetruefalse]in [ ]bools any(out[ ]true in [ ]bools all(out[ ]false these methods also work with non-boolean arrayswhere non-zero elements evaluate to true sorting like python' built-in list typenumpy arrays can be sorted in-place using the sort methodin [ ]arr randn( in [ ]arr out[ ]array( - ] - - in [ ]arr sort(data processing using arrays www it-ebooks info