a=np.array([[[1,1],[2,2],[3,3]],[[4,4],[5,5],[6,6]],[[7,7],[8,8],[9,9]],[[10,10],[11,11],[12,12]]])print aprint a.shapeb=a.mean(0).shapec=a.mean(1).shaped=a.mean(2).shapeprint bprint cprint d
output:
[[[ 1 1] [ 2 2] [ 3 3]] [[ 4 4] [ 5 5] [ 6 6]] [[ 7 7] [ 8 8] [ 9 9]] [[10 10] [11 11] [12 12]]](4, 3, 2)(3, 2)(4, 2)(4, 3)