# Statistics¶

## Order statistics¶

cupy.amin(*args, **kwargs)[source]
cupy.amax(*args, **kwargs)[source]
cupy.nanmin(a, axis=None, out=None, keepdims=False)[source]

Returns the minimum of an array along an axis ignoring NaN.

When there is a slice whose elements are all NaN, a RuntimeWarning is raised and NaN is returned.

Parameters: a (cupy.ndarray) – Array to take the minimum. axis (int) – Along which axis to take the minimum. The flattened array is used by default. out (cupy.ndarray) – Output array. keepdims (bool) – If True, the axis is remained as an axis of size one. The minimum of a, along the axis if specified. cupy.ndarray
cupy.nanmax(a, axis=None, out=None, keepdims=False)[source]

Returns the maximum of an array along an axis ignoring NaN.

When there is a slice whose elements are all NaN, a RuntimeWarning is raised and NaN is returned.

Parameters: a (cupy.ndarray) – Array to take the maximum. axis (int) – Along which axis to take the maximum. The flattened array is used by default. out (cupy.ndarray) – Output array. keepdims (bool) – If True, the axis is remained as an axis of size one. The maximum of a, along the axis if specified. cupy.ndarray

## Means and variances¶

cupy.mean(a, axis=None, dtype=None, out=None, keepdims=False)[source]

Returns the arithmetic mean along an axis.

Parameters: a (cupy.ndarray) – Array to compute mean. axis (int) – Along which axis to compute mean. The flattened array is used by default. dtype – Data type specifier. out (cupy.ndarray) – Output array. keepdims (bool) – If True, the axis is remained as an axis of size one. The mean of the input array along the axis. cupy.ndarray
cupy.var(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False)[source]

Returns the variance along an axis.

Parameters: a (cupy.ndarray) – Array to compute variance. axis (int) – Along which axis to compute variance. The flattened array is used by default. dtype – Data type specifier. out (cupy.ndarray) – Output array. keepdims (bool) – If True, the axis is remained as an axis of size one. The variance of the input array along the axis. cupy.ndarray
cupy.std(a, axis=None, dtype=None, out=None, ddof=0, keepdims=False)[source]

Returns the standard deviation along an axis.

Parameters: a (cupy.ndarray) – Array to compute standard deviation. axis (int) – Along which axis to compute standard deviation. The flattened array is used by default. dtype – Data type specifier. out (cupy.ndarray) – Output array. keepdims (bool) – If True, the axis is remained as an axis of size one. The standard deviation of the input array along the axis. cupy.ndarray

## Histograms¶

cupy.bincount(x, weights=None, minlength=None)[source]

Count number of occurrences of each value in array of non-negative ints.

Parameters: x (cupy.ndarray) – Input array. weights (cupy.ndarray) – Weights array which has the same shape as x. minlength (int) – A minimum number of bins for the output array. The result of binning the input array. The length of output is equal to max(cupy.max(x) + 1, minlength). cupy.ndarray