I'm trying to take the mean of a given n-dimensional vector along one of its axes. For example,
$\mu_2\begin{bmatrix} 1 & 2 & 2 \\ 2 & 3 & 4 \\ 4 & 4 & 2 \end{bmatrix} = \begin{bmatrix} \frac {1 + 2 + 2} 3 \\ \frac {2 + 3 + 4} 3 \\ \frac {4 + 4 + 2} 3 \end{bmatrix} = \begin{bmatrix} \frac 5 3 \\ 3 \\ \frac 3 {10} \end{bmatrix}$
Here I've taken the mean of the first vector along its second axis. It's a simple-to-understand process for 1- and 2-D vectors, but anything beyond is hard to perceive, let alone calculate.
Is there some formula for accomplishing this for any vector of shape $(\alpha, \beta, \chi...)$?