scipy.stats.mean(array, axis=0) function calculates the arithmetic mean of the array elements along the specified axis of the array (list in python).
It's formula -
👁 Image
Parameters :
array: Input array or object having the elements to calculate the arithmetic mean.
axis: Axis along which the mean is to be computed. By default axis = 0
Returns : Arithmetic mean of the array elements based on the set parameters.
Code #1:
Output:
Arithmetic Mean is : 10.3333333333
Code #2: With multi-dimensional data