Skip to Content
DocumentationFunctionalReduce Opsmean_op

mean_op

View the code on GitHub

Structs

Functions

mean

mean(arg0: Array, axes: List[Int], keepdims: Bool = False) -> Array
Computes the mean of the input array along the specified axes.
Args
  • arg0: Array The input array.

  • axes: List[Int] The axes along which to compute the mean.

  • keepdims: Bool (default: False) If True, the reduced axes are retained in the output array.

Returns
  • Array - An array containing the mean of the input array along the specified axes.

Examples:

a = Array([[1, 2], [3, 4]]) result = mean(a, List(0)) print(result)

Note: This function supports:

  • Automatic differentiation (forward and reverse modes).
  • Complex valued arguments.
Last updated on