Statistical functions

Statistical functions#

integrate(x: Array, /, *, dim_name: str | Iterable[str] | None = None, dtype=None) Array[source]#

Computes the integral along the specified Dimension(s). The integration is performed using simple rectangle rule integration, also known as Riemann summation [1]. The integration is equivalent to summing up the values along the specified Dimension(s) and multipling them with the integration element given by d_pos or d_freq of the respective Dimension. The integration for each Dimension is performed in the space of the input Array. The actual summation is forwarded to [2].

Parameters:
  • x (Array) – The input Array.

  • dim_name (Optional[Union[str, Iterable[str]]], optional) – Dimension name(s) along which the integration is performed. The default, dim_name=None, will reduce over all Dimensions.

  • dtype (Any, optional) – The dtype of the returned Array, by default None.

Returns:

New Array with the specified dimensions reduced by computing the integration of the elements along those dimensions.

Return type:

Array

See also

sum

References

max(x: Array, /, *, dim_name: str | Iterable[str] | None = None) Array[source]#

Computes the maximum of all values along the specified Dimension(s). This is a thin wrapper around [3], refer to its documentation and the documentation of the used array library for detailed information about its semantics.

Parameters:
  • x (Array) – The input Array.

  • dim_name (Optional[Union[str, Iterable[str]]], optional) – Dimension name(s) along which the maximum is computed. The default, dim_name=None, will reduce over all Dimensions.

Returns:

New Array with the specified dimensions reduced by computing the maximum of the elements along those dimensions.

Return type:

Array

References

mean(x: Array, /, *, dim_name: str | Iterable[str] | None = None) Array[source]#

Computes the mean of all values along the specified Dimension(s). This is a thin wrapper around [4], refer to its documentation and the documentation of the used array library for detailed information about its semantics.

Parameters:
  • x (Array) – The input Array.

  • dim_name (Optional[Union[str, Iterable[str]]], optional) – Dimension name(s) along which the mean is computed. The default, dim_name=None, will reduce over all Dimensions.

Returns:

New Array with the specified dimensions reduced by computing the mean of the elements along those dimensions.

Return type:

Array

References

min(x: Array, /, *, dim_name: str | Iterable[str] | None = None) Array[source]#

Computes the minimum of all values along the specified Dimension(s). This is a thin wrapper around [5], refer to its documentation and the documentation of the used array library for detailed information about its semantics.

Parameters:
  • x (Array) – The input Array.

  • dim_name (Optional[Union[str, Iterable[str]]], optional) – Dimension name(s) along which the minimum is computed. The default, dim_name=None, will reduce over all Dimensions.

Returns:

New Array with the specified dimensions reduced by computing the minimum of the elements along those dimensions.

Return type:

Array

References

prod(x: Array, /, *, dim_name: str | Iterable[str] | None = None, dtype=None) Array[source]#

Computes the product of all values over the specified Dimension(s). This is a thin wrapper around [6], refer to its documentation and the documentation of the used array library for detailed information about its semantics.

Parameters:
  • x (Array) – The input Array.

  • dim_name (Optional[Union[str, Iterable[str]]], optional) – Dimension name(s) along which the products are computed. The default, dim_name=None, will reduce over all Dimensions.

  • dtype (Any, optional) – The dtype of the returned Array, by default None.

Returns:

New Array with the specified dimensions reduced by computing the product of the elements along those dimensions.

Return type:

Array

References

sum(x: Array, /, *, dim_name: str | Iterable[str] | None = None, dtype=None) Array[source]#

Computes the sum of all values over the specified Dimension(s). This is a thin wrapper around [7], refer to its documentation and the documentation of the used array library for detailed information about its semantics.

Parameters:
  • x (Array) – The input Array.

  • dim_name (Optional[Union[str, Iterable[str]]], optional) – Dimension name(s) over which the sum is performed. The default, dim_name=None, will reduce over all Dimensions.

  • dtype (Any, optional) – The dtype of the returned Array, by default None.

Returns:

New Array with the specified dimensions reduced by computing the sum of the elements along those dimensions.

Return type:

Array

References