mean along third dimension array python code example Example: mean along third dimension array python res = np.mean(X, axis=2)