If you have a sufficiently recent NumPy, you can do
m_mean = m.mean(axis=(1, 2))
I believe this was introduced in 1.7, though I'm not sure. The documentation was only updated to reflect this in 1.10, but it worked earlier than that.
If your NumPy is too old, you can take the mean a bit more manually:
m_mean = m.sum(axis=2).sum(axis=1) / np.prod(m.shape[1:3])
These will both produce 1-dimensional results. If you really want that extra length-1 axis, you can do something like m_mean = m_mean[:, np.newaxis] to put the extra axis there.
You can also use the numpy.mean() ufunc and pass the output array as an argument to out= as in:
np.mean(m, axis=(1, 2), out=m_mean)
In numpy 1.7 you can give multiple axis to np.mean:
d.mean(axis=tuple(range(1, d.ndim)))
I am guessing this will perform similarly to the other proposed solutions, unless reshaping the array to flatten all dimensions triggers a copy of the data, in which case this should be much faster. So this is probably going to give a more consistent performance.
My approach would be to reshape the array to flatten all of the higher dimensions and then run the mean on axis 1. Is this what your looking for?
In [14]: x = np.array([[[1,2],[3,4]],[[5,6],[7,8]]])
In [16]: x.reshape((x.shape[0], -1)).mean(axis=1)
Out[16]: array([ 2.5, 6.5])
(step 2 just calculates the product of the lengths of the higher dims)