Back to Core Functions
mean
Average of array elements
Syntax
M = mean(A) M = mean(A, dim)
Description
Returns the arithmetic mean. With a dimension argument, computes the mean along that dimension.
Parameters
| Name | Description |
|---|---|
| A | Input array (scalar or NDArray) |
| dim(optional) | Dimension to average along (1-indexed) |
Returns
Mean value (scalar or NDArray)