arkouda.array_api.statistical_functions

Functions

cumulative_sum(→ arkouda.array_api.array_object.Array)

Compute the cumulative sum of the elements of an array along a given axis.

max(→ arkouda.array_api.array_object.Array)

Compute the maximum values of an array along a given axis or axes.

mean(→ arkouda.array_api.array_object.Array)

Compute the minimum values of an array along a given axis or axes.

mean_shim(x[, axis, dtype, out, keepdims])

min(→ arkouda.array_api.array_object.Array)

Compute the mean of an array along a given axis or axes.

prod(→ arkouda.array_api.array_object.Array)

Compute the product of an array along a given axis or axes.

std(→ arkouda.array_api.array_object.Array)

Compute the standard deviation of an array along a given axis or axes.

sum(→ arkouda.array_api.array_object.Array)

Compute the sum of an array along a given axis or axes.

var(→ arkouda.array_api.array_object.Array)

Compute the variance of an array along a given axis or axes.

Module Contents

arkouda.array_api.statistical_functions.cumulative_sum(x: arkouda.array_api.array_object.Array, /, *, axis: int | None = None, dtype: arkouda.array_api._typing.Dtype | None = None, include_initial: bool = False) arkouda.array_api.array_object.Array[source]

Compute the cumulative sum of the elements of an array along a given axis.

Parameters:
  • x (Array) – The array to compute the cumulative sum of

  • axis (int, optional) – The axis along which to compute the cumulative sum. If x is 1D, this argument is optional, otherwise it is required.

  • dtype (Dtype, optional) – The dtype of the returned array. If None, the dtype of the input array is used.

  • include_initial (bool, optional) – Whether to include the initial value as the first element of the output.

arkouda.array_api.statistical_functions.max(x: arkouda.array_api.array_object.Array, /, *, axis: int | Tuple[int, Ellipsis] | None = None, keepdims: bool = False) arkouda.array_api.array_object.Array[source]

Compute the maximum values of an array along a given axis or axes.

Parameters:
  • x (Array) – The array to compute the maximum of

  • axis (int or Tuple[int, ...], optional) – The axis or axes along which to compute the maximum values. If None, the maximum value of the entire array is computed (returning a scalar-array).

  • keepdims (bool, optional) – Whether to keep the singleton dimension(s) along axis in the result.

arkouda.array_api.statistical_functions.mean(x: arkouda.array_api.array_object.Array, /, *, axis: int | Tuple[int, Ellipsis] | None = None, keepdims: bool = False) arkouda.array_api.array_object.Array[source]

Compute the minimum values of an array along a given axis or axes.

Parameters:
  • x (Array) – The array to compute the minimum of

  • axis (int or Tuple[int, ...], optional) – The axis or axes along which to compute the mean. If None, the mean of the entire array is computed (returning a scalar-array).

  • keepdims (bool, optional) – Whether to keep the singleton dimension(s) along axis in the result.

arkouda.array_api.statistical_functions.mean_shim(x: arkouda.array_api.array_object.Array, axis=None, dtype=None, out=None, keepdims=False)[source]
arkouda.array_api.statistical_functions.min(x: arkouda.array_api.array_object.Array, /, *, axis: int | Tuple[int, Ellipsis] | None = None, keepdims: bool = False) arkouda.array_api.array_object.Array[source]

Compute the mean of an array along a given axis or axes.

Parameters:
  • x (Array) – The array to compute the mean of

  • axis (int or Tuple[int, ...], optional) – The axis or axes along which to compute the minimum values. If None, the minimum of the entire array is computed (returning a scalar-array).

  • keepdims (bool, optional) – Whether to keep the singleton dimension(s) along axis in the result.

arkouda.array_api.statistical_functions.prod(x: arkouda.array_api.array_object.Array, /, *, axis: int | Tuple[int, Ellipsis] | None = None, dtype: arkouda.array_api._typing.Dtype | None = None, keepdims: bool = False) arkouda.array_api.array_object.Array[source]

Compute the product of an array along a given axis or axes.

Parameters:
  • x (Array) – The array to compute the product of

  • axis (int or Tuple[int, ...], optional) – The axis or axes along which to compute the product. If None, the product of the entire array is computed (returning a scalar-array).

  • dtype (Dtype, optional) – The dtype of the returned array. If None, the dtype of the input array is used.

  • keepdims (bool, optional) – Whether to keep the singleton dimension(s) along axis in the result.

arkouda.array_api.statistical_functions.std(x: arkouda.array_api.array_object.Array, /, *, axis: int | Tuple[int, Ellipsis] | None = None, correction: int | float = 0.0, keepdims: bool = False) arkouda.array_api.array_object.Array[source]

Compute the standard deviation of an array along a given axis or axes.

Parameters:
  • x (Array) – The array to compute the standard deviation of

  • axis (int or Tuple[int, ...], optional) – The axis or axes along which to compute the standard deviation. If None, the standard deviation of the entire array is computed (returning a scalar-array).

  • correction (int or float, optional) – The degrees of freedom correction to apply. The default is 0.

  • keepdims (bool, optional) – Whether to keep the singleton dimension(s) along axis in the result.

arkouda.array_api.statistical_functions.sum(x: arkouda.array_api.array_object.Array, /, *, axis: int | Tuple[int, Ellipsis] | None = None, dtype: arkouda.array_api._typing.Dtype | None = None, keepdims: bool = False) arkouda.array_api.array_object.Array[source]

Compute the sum of an array along a given axis or axes.

Parameters:
  • x (Array) – The array to compute the sum of

  • axis (int or Tuple[int, ...], optional) – The axis or axes along which to compute the sum. If None, the sum of the entire array is computed (returning a scalar-array).

  • dtype (Dtype, optional) – The dtype of the returned array. If None, the dtype of the input array is used.

  • keepdims (bool, optional) – Whether to keep the singleton dimension(s) along axis in the result.

arkouda.array_api.statistical_functions.var(x: arkouda.array_api.array_object.Array, /, *, axis: int | Tuple[int, Ellipsis] | None = None, correction: int | float = 0.0, keepdims: bool = False) arkouda.array_api.array_object.Array[source]

Compute the variance of an array along a given axis or axes.

Parameters:
  • x (Array) – The array to compute the variance of

  • axis (int or Tuple[int, ...], optional) – The axis or axes along which to compute the variance. If None, the variance of the entire array is computed (returning a scalar-array).

  • correction (int or float, optional) – The degrees of freedom correction to apply. The default is 0.

  • keepdims (bool, optional) – Whether to keep the singleton dimension(s) along axis in the result.