I have an array a
like this:
a = [[40, 10], [50, 11]]
I need to calculate the mean for each dimension separately, the result should be this:
[45, 10.5]
45
being the mean of a[*][0]
and 10.5
the mean of a[*][1]
.
What is the most elegant way of solving this without using a loop?